From a5a480bc963660833c82191fd058d04d913f9624 Mon Sep 17 00:00:00 2001 From: Ujjwal Kumar <78945437+ujjwal-ibm@users.noreply.github.com> Date: Wed, 1 Jan 2025 10:40:10 +0530 Subject: [PATCH] feat(spec): updated the sdk as per the api spec released on 2024-12-26 (#70) Signed-off-by: Ujjwal Kumar --- ibm_vpc/vpc_v1.py | 13537 +++++++------- test/unit/test_vpc_v1.py | 35713 +++++++++++-------------------------- 2 files changed, 17337 insertions(+), 31913 deletions(-) diff --git a/ibm_vpc/vpc_v1.py b/ibm_vpc/vpc_v1.py index 9aaaeef..464bc8e 100644 --- a/ibm_vpc/vpc_v1.py +++ b/ibm_vpc/vpc_v1.py @@ -21,7 +21,7 @@ and manage virtual server instances, along with subnets, volumes, load balancers, and more. -API Version: 2024-11-13 +API Version: 2024-12-26 """ from datetime import datetime @@ -53,7 +53,7 @@ class VpcV1(BaseService): @classmethod def new_instance( cls, - version: Optional[str] = "2024-11-12", + version: Optional[str] = "2024-12-17", service_name: str = DEFAULT_SERVICE_NAME, generation: Optional[int] = 2, ) -> 'VpcV1': @@ -62,8 +62,8 @@ def new_instance( external configuration. :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-11-14`. + behavior documented here, specify any date between `2024-11-19` and + `2024-12-26`. """ 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: Optional[str] = "2024-11-12", + version: Optional[str] = "2024-12-17", authenticator: Authenticator = None, generation: Optional[int] = 2, ) -> None: @@ -87,8 +87,8 @@ def __init__( Construct a new client for the vpc service. :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-11-14`. + behavior documented here, specify any date between `2024-11-19` and + `2024-12-26`. :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 @@ -4432,12 +4432,13 @@ def create_key( information necessary to create the new key. The public key value must be provided. - :param str public_key: A unique public SSH key to import, in OpenSSH format + :param str public_key: The public SSH key to use, in OpenSSH format (consisting of three space-separated fields: the algorithm name, - base64-encoded key, and a comment). The algorithm and comment fields may be - omitted, as only the key field is imported. - Keys of type `rsa` may be 2048 or 4096 bits in length, however 4096 is - recommended. Keys of type `ed25519` are 256 bits in length. + base64-encoded key value, and a comment). The algorithm and comment fields + may be omitted, as only the key field is used. + The key field must not match another key in the region. + Keys of type `rsa` must be 2048 or 4096 bits in length (4096 is + recommended). Keys of type `ed25519` must be 256 bits in length. :param str name: (optional) The name for this key. The name must not be used by another key in the region. If unspecified, the name will be a hyphenated list of randomly-selected words. @@ -5036,6 +5037,7 @@ def list_instances( placement_group_id: Optional[str] = None, placement_group_crn: Optional[str] = None, placement_group_name: Optional[str] = None, + reservation_affinity_policy: Optional[str] = None, reservation_id: Optional[str] = None, reservation_crn: Optional[str] = None, reservation_name: Optional[str] = None, @@ -5082,6 +5084,9 @@ def list_instances( :param str placement_group_name: (optional) Filters the collection to resources with a `placement_target.name` property matching the exact specified placement group name. + :param str reservation_affinity_policy: (optional) Filters the collection + to instances with a `reservation_affinity.policy` property matching the + specified value. :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 @@ -5123,6 +5128,7 @@ def list_instances( 'placement_group.id': placement_group_id, 'placement_group.crn': placement_group_crn, 'placement_group.name': placement_group_name, + 'reservation_affinity.policy': reservation_affinity_policy, 'reservation.id': reservation_id, 'reservation.crn': reservation_crn, 'reservation.name': reservation_name, @@ -6808,9 +6814,7 @@ def list_instance_network_interface_floating_ips( path_param_keys = ['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, @@ -6868,9 +6872,7 @@ def remove_instance_network_interface_floating_ip( path_param_keys = ['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, @@ -6929,9 +6931,7 @@ def get_instance_network_interface_floating_ip( path_param_keys = ['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, @@ -6994,9 +6994,7 @@ def add_instance_network_interface_floating_ip( path_param_keys = ['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, @@ -7206,8 +7204,9 @@ def create_instance_volume_attachment( create the new volume attachment. :param str instance_id: The virtual server instance identifier. - :param VolumeAttachmentPrototypeVolume volume: An existing volume to attach - to the instance, or a prototype object for a new volume. + :param VolumeAttachmentPrototypeVolume volume: The volume to use for this + attachment. This can be specified as an existing unattached + volume, or a prototype object for a new volume. :param bool delete_volume_on_instance_delete: (optional) Indicates whether deleting the instance will also delete the attached volume. :param str name: (optional) The name for this volume attachment. The name @@ -8172,9 +8171,7 @@ def list_instance_group_manager_actions( 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_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, @@ -8240,9 +8237,7 @@ def create_instance_group_manager_action( 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_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, @@ -8302,9 +8297,7 @@ def delete_instance_group_manager_action( 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, @@ -8364,9 +8357,7 @@ def get_instance_group_manager_action( 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, @@ -8435,9 +8426,7 @@ def update_instance_group_manager_action( 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, @@ -8501,9 +8490,7 @@ def list_instance_group_manager_policies( 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_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, @@ -8569,9 +8556,7 @@ def create_instance_group_manager_policy( 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_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, @@ -8631,9 +8616,7 @@ def delete_instance_group_manager_policy( 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, @@ -8693,9 +8676,7 @@ def get_instance_group_manager_policy( 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, @@ -8764,9 +8745,7 @@ def update_instance_group_manager_policy( 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, @@ -9073,6 +9052,8 @@ def list_reservations( start: Optional[str] = None, limit: Optional[int] = None, name: Optional[str] = None, + profile_resource_type: Optional[str] = None, + affinity_policy: Optional[str] = None, resource_group_id: Optional[str] = None, zone_name: Optional[str] = None, **kwargs, @@ -9092,6 +9073,12 @@ def list_reservations( :param int limit: (optional) The number of resources to return on a page. :param str name: (optional) Filters the collection to resources with a `name` property matching the exact specified name. + :param str profile_resource_type: (optional) Filters the collection of + resources with a `profile.resource_type` property matching the specified + value. + :param str affinity_policy: (optional) Filters the collection to + reservations with an `affinity_policy` property matching the specified + value. :param str resource_group_id: (optional) Filters the collection to resources with a `resource_group.id` property matching the specified identifier. @@ -9116,6 +9103,8 @@ def list_reservations( 'start': start, 'limit': limit, 'name': name, + 'profile.resource_type': profile_resource_type, + 'affinity_policy': affinity_policy, 'resource_group.id': resource_group_id, 'zone.name': zone_name, } @@ -9159,13 +9148,15 @@ def create_reservation( configuration to use. :param ReservationCommittedUsePrototype committed_use: The committed use configuration to use for this reservation. - :param ReservationProfilePrototype profile: The - [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for - this - reservation. + :param ReservationProfilePrototype profile: The [instance + profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) or + [bare metal server + profile](https://cloud.ibm.com/docs/vpc?topic=vpc-bare-metal-servers-profile) + to use for this reservation. :param ZoneIdentity zone: The zone to use for this reservation. :param str affinity_policy: (optional) The affinity policy to use for this reservation: + - `automatic`: The reservation will be automatically selected - `restricted`: The reservation must be manually requested. :param str name: (optional) The name for this reservation. The name must not be used by another reservation in the region. If unspecified, the name @@ -10176,7 +10167,9 @@ def delete_dedicated_host( """ Delete a dedicated host. - This request deletes a dedicated host. + This request deletes a dedicated host. This operation cannot be reversed. For this + request to succeed, `instances` must be empty and `instance_placement_enabled` + must be `false`. :param str id: The dedicated host identifier. :param dict headers: A `dict` containing the request headers @@ -10737,6 +10730,9 @@ def list_bare_metal_servers( limit: Optional[int] = None, resource_group_id: Optional[str] = None, name: Optional[str] = None, + reservation_id: Optional[str] = None, + reservation_crn: Optional[str] = None, + reservation_name: Optional[str] = None, vpc_id: Optional[str] = None, vpc_crn: Optional[str] = None, vpc_name: Optional[str] = None, @@ -10755,6 +10751,12 @@ def list_bare_metal_servers( identifier. :param str name: (optional) Filters the collection to resources with a `name` property matching the exact specified name. + :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 identifier. + :param str reservation_name: (optional) Filters the collection to resources + 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 @@ -10781,6 +10783,9 @@ def list_bare_metal_servers( 'limit': limit, 'resource_group.id': resource_group_id, 'name': name, + 'reservation.id': reservation_id, + 'reservation.crn': reservation_crn, + 'reservation.name': reservation_name, 'vpc.id': vpc_id, 'vpc.crn': vpc_crn, 'vpc.name': vpc_name, @@ -11201,9 +11206,7 @@ def create_bare_metal_server_network_attachment( 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 - ) + 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, @@ -11802,11 +11805,7 @@ def list_bare_metal_server_network_interface_floating_ips( 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_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, @@ -11865,9 +11864,7 @@ def remove_bare_metal_server_network_interface_floating_ip( 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_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, @@ -11927,9 +11924,7 @@ def get_bare_metal_server_network_interface_floating_ip( 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_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, @@ -11995,9 +11990,7 @@ def add_bare_metal_server_network_interface_floating_ip( 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_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, @@ -12057,9 +12050,7 @@ def list_bare_metal_server_network_interface_ips( 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_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, @@ -12123,9 +12114,7 @@ def get_bare_metal_server_network_interface_ip( 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_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, @@ -14485,7 +14474,8 @@ def list_share_accessor_bindings( List accessor bindings for a file 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. + a resource (possibly in another account) with access to this file share including + its snapshots. The share accessor bindings will be sorted by their `created_at` property values, with newest bindings first. @@ -15032,6 +15022,361 @@ def update_share_mount_target( response = self.send(request, **kwargs) return response + def list_share_snapshots( + self, + share_id: str, + *, + backup_policy_plan_id: Optional[str] = None, + name: Optional[str] = None, + start: Optional[str] = None, + limit: Optional[int] = None, + sort: Optional[str] = None, + **kwargs, + ) -> DetailedResponse: + """ + List file share snapshots. + + This request lists snapshots for the specified file share, or across all + accessible file shares. A snapshot preserves the data of a share at the time the + snapshot was captured. + If the file share is a replica, the list will contain snapshots corresponding to + snapshots on the source. + + :param str share_id: The file share identifier, or `-` to wildcard all + accessible file shares. + :param str backup_policy_plan_id: (optional) Filters the collection to + backup policy jobs with a `backup_policy_plan.id` property matching the + specified identifier. + :param str name: (optional) Filters the collection to resources with a + `name` property matching the exact specified name. + :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 sort: (optional) Sorts the returned collection by the specified + property name in ascending order. A `-` may be prepended to the name to + sort in descending order. For example, the value `-created_at` sorts the + collection by the `created_at` property in descending order, and the value + `name` sorts it by the `name` property in ascending order. + :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 `ShareSnapshotCollection` object + """ + + if not share_id: + raise ValueError('share_id must be provided') + headers = {} + sdk_headers = get_sdk_headers( + service_name=self.DEFAULT_SERVICE_NAME, + service_version='V1', + operation_id='list_share_snapshots', + ) + headers.update(sdk_headers) + + params = { + 'version': self.version, + 'generation': self.generation, + 'backup_policy_plan.id': backup_policy_plan_id, + 'name': name, + 'start': start, + 'limit': limit, + 'sort': sort, + } + + if 'headers' in kwargs: + headers.update(kwargs.get('headers')) + del kwargs['headers'] + headers['Accept'] = 'application/json' + + path_param_keys = ['share_id'] + path_param_values = self.encode_path_vars(share_id) + path_param_dict = dict(zip(path_param_keys, path_param_values)) + url = '/shares/{share_id}/snapshots'.format(**path_param_dict) + request = self.prepare_request( + method='GET', + url=url, + headers=headers, + params=params, + ) + + response = self.send(request, **kwargs) + return response + + def create_share_snapshot( + self, + share_id: str, + *, + name: Optional[str] = None, + user_tags: Optional[List[str]] = None, + **kwargs, + ) -> DetailedResponse: + """ + Create a snapshot for a file share. + + This request creates a new share snapshot from a share snapshot prototype object. + The prototype object is structured in the same way as a retrieved share snapshot, + and contains the information necessary to create the new share snapshot. + The share must have the `access_control_mode` set to `security_group`. + At present, the snapshot's `resource_group` will be inherited from its share, but + may be specifiable in the future. + The new snapshot will inherit the encryption settings from its share, , and must + have a + `replication_role` of `source` or `none`. + If the share has a `replication_role` of `source`, a corresponding snapshot on the + replica share will be created with a `status` of `pending`. It will remain in + `pending` until the data is synchronized per the replication schedule determined + by the replica share's `replication_cron_spec`. + + :param str share_id: The file share identifier. + :param str name: (optional) The name for this share snapshot. The name must + not be used by another snapshot for the file share. If unspecified, the + name will be a hyphenated list of randomly-selected words. + :param List[str] user_tags: (optional) The [user + tags](https://cloud.ibm.com/apidocs/tagging#types-of-tags) associated with + this share snapshot. + :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 `ShareSnapshot` object + """ + + if not share_id: + raise ValueError('share_id must be provided') + headers = {} + sdk_headers = get_sdk_headers( + service_name=self.DEFAULT_SERVICE_NAME, + service_version='V1', + operation_id='create_share_snapshot', + ) + headers.update(sdk_headers) + + params = { + 'version': self.version, + 'generation': self.generation, + } + + data = { + 'name': name, + 'user_tags': user_tags, + } + data = {k: v for (k, v) in data.items() if v is not None} + data = json.dumps(data) + headers['content-type'] = 'application/json' + + if 'headers' in kwargs: + headers.update(kwargs.get('headers')) + del kwargs['headers'] + headers['Accept'] = 'application/json' + + path_param_keys = ['share_id'] + path_param_values = self.encode_path_vars(share_id) + path_param_dict = dict(zip(path_param_keys, path_param_values)) + url = '/shares/{share_id}/snapshots'.format(**path_param_dict) + request = self.prepare_request( + method='POST', + url=url, + headers=headers, + params=params, + data=data, + ) + + response = self.send(request, **kwargs) + return response + + def delete_share_snapshot( + self, + share_id: str, + id: str, + **kwargs, + ) -> DetailedResponse: + """ + Delete a share snapshot. + + This request deletes a share snapshot. This operation cannot be reversed. For this + request to succeed, the share must have a `replication_role` of `source` or + `none`. + If the request is accepted, the share snapshot `lifecycle_state` will be set to + `deleting`. Once deletion processing completes, the share snapshot will no longer + be retrievable. + Deleting a share snapshot will not affect any previously-accepted requests to + create a share from it. + If the share has a `replication_role` of `source`, the corresponding snapshot on + the replica share will be subsequently moved to a `lifecycle_state` of `deleting`. + If the data for the corresponding snapshot has already been synchronized via the + replication schedule determined by `replication_cron_spec`, the snapshot will + remain available in the replica share's `.snapshot` directory until the next + replication sync. + + :param str share_id: The file share identifier. + :param str id: The share snapshot 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 `ShareSnapshot` 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='delete_share_snapshot', + ) + 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}/snapshots/{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_snapshot( + self, + share_id: str, + id: str, + **kwargs, + ) -> DetailedResponse: + """ + Retrieve a share snapshot. + + This request retrieves a single share snapshot specified by the identifier in the + URL. + + :param str share_id: The file share identifier. + :param str id: The share snapshot 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 `ShareSnapshot` 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_snapshot', + ) + 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}/snapshots/{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 update_share_snapshot( + self, + share_id: str, + id: str, + share_snapshot_patch: 'ShareSnapshotPatch', + *, + if_match: Optional[str] = None, + **kwargs, + ) -> DetailedResponse: + """ + Update a share snapshot. + + This request updates a share snapshot with the information provided in a share + snapshot patch object. The share snapshot patch object is structured in the same + way as a retrieved share snapshot and needs to contain only the information to be + updated. + + :param str share_id: The file share identifier. + :param str id: The share snapshot identifier. + :param ShareSnapshotPatch share_snapshot_patch: The share snapshot patch. + :param str if_match: (optional) If present, the request will fail if the + specified ETag value does not match the resource's current ETag value. + Required if the request body includes an array. + :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 `ShareSnapshot` object + """ + + if not share_id: + raise ValueError('share_id must be provided') + if not id: + raise ValueError('id must be provided') + if share_snapshot_patch is None: + raise ValueError('share_snapshot_patch must be provided') + if isinstance(share_snapshot_patch, ShareSnapshotPatch): + share_snapshot_patch = convert_model(share_snapshot_patch) + headers = { + 'If-Match': if_match, + } + sdk_headers = get_sdk_headers( + service_name=self.DEFAULT_SERVICE_NAME, + service_version='V1', + operation_id='update_share_snapshot', + ) + headers.update(sdk_headers) + + params = { + 'version': self.version, + 'generation': self.generation, + } + + data = json.dumps(share_snapshot_patch) + headers['content-type'] = 'application/merge-patch+json' + + 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}/snapshots/{id}'.format(**path_param_dict) + request = self.prepare_request( + method='PATCH', + url=url, + headers=headers, + params=params, + data=data, + ) + + response = self.send(request, **kwargs) + return response + def delete_share_source( self, share_id: str, @@ -17873,9 +18218,7 @@ def list_cluster_network_subnet_reserved_ips( path_param_keys = ['cluster_network_id', 'cluster_network_subnet_id'] path_param_values = self.encode_path_vars(cluster_network_id, cluster_network_subnet_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/cluster_networks/{cluster_network_id}/subnets/{cluster_network_subnet_id}/reserved_ips'.format( - **path_param_dict - ) + url = '/cluster_networks/{cluster_network_id}/subnets/{cluster_network_subnet_id}/reserved_ips'.format(**path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -17953,9 +18296,7 @@ def create_cluster_network_subnet_reserved_ip( path_param_keys = ['cluster_network_id', 'cluster_network_subnet_id'] path_param_values = self.encode_path_vars(cluster_network_id, cluster_network_subnet_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/cluster_networks/{cluster_network_id}/subnets/{cluster_network_subnet_id}/reserved_ips'.format( - **path_param_dict - ) + url = '/cluster_networks/{cluster_network_id}/subnets/{cluster_network_subnet_id}/reserved_ips'.format(**path_param_dict) request = self.prepare_request( method='POST', url=url, @@ -18024,9 +18365,7 @@ def delete_cluster_network_subnet_reserved_ip( path_param_keys = ['cluster_network_id', 'cluster_network_subnet_id', 'id'] path_param_values = self.encode_path_vars(cluster_network_id, cluster_network_subnet_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/cluster_networks/{cluster_network_id}/subnets/{cluster_network_subnet_id}/reserved_ips/{id}'.format( - **path_param_dict - ) + url = '/cluster_networks/{cluster_network_id}/subnets/{cluster_network_subnet_id}/reserved_ips/{id}'.format(**path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -18086,9 +18425,7 @@ def get_cluster_network_subnet_reserved_ip( path_param_keys = ['cluster_network_id', 'cluster_network_subnet_id', 'id'] path_param_values = self.encode_path_vars(cluster_network_id, cluster_network_subnet_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/cluster_networks/{cluster_network_id}/subnets/{cluster_network_subnet_id}/reserved_ips/{id}'.format( - **path_param_dict - ) + url = '/cluster_networks/{cluster_network_id}/subnets/{cluster_network_subnet_id}/reserved_ips/{id}'.format(**path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -18168,9 +18505,7 @@ def update_cluster_network_subnet_reserved_ip( path_param_keys = ['cluster_network_id', 'cluster_network_subnet_id', 'id'] path_param_values = self.encode_path_vars(cluster_network_id, cluster_network_subnet_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/cluster_networks/{cluster_network_id}/subnets/{cluster_network_subnet_id}/reserved_ips/{id}'.format( - **path_param_dict - ) + url = '/cluster_networks/{cluster_network_id}/subnets/{cluster_network_subnet_id}/reserved_ips/{id}'.format(**path_param_dict) request = self.prepare_request( method='PATCH', url=url, @@ -23996,8 +24331,7 @@ def create_load_balancer_listener( `protocol` of `https`. :param int connection_limit: (optional) The concurrent connection limit for the listener. If reached, incoming connections may be queued or rejected. - This property will be present for load balancers in the `application` - family. + Supported for load balancers in the `application` family. :param LoadBalancerPoolIdentity default_pool: (optional) The default pool for this listener. If `https_redirect` is specified, the default pool will not be used. @@ -24685,9 +25019,7 @@ def list_load_balancer_listener_policy_rules( 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_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, @@ -24779,9 +25111,7 @@ def create_load_balancer_listener_policy_rule( 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_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, @@ -24844,9 +25174,7 @@ def delete_load_balancer_listener_policy_rule( 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_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, @@ -24908,9 +25236,7 @@ def get_load_balancer_listener_policy_rule( 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_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, @@ -24982,9 +25308,7 @@ def update_load_balancer_listener_policy_rule( 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_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, @@ -25413,12 +25737,8 @@ def create_load_balancer_pool_member( The port must be unique across all members for all pools associated with this pool's listener. :param LoadBalancerPoolMemberTargetPrototype target: The pool member - target. Load balancers in the `network` family support virtual server - instances. Load balancers in the `application` family support IP addresses. - If the load - balancer has route mode enabled, the member must be in a zone the load - balancer has a - subnet in. + target. If the load balancer has route mode enabled, the member must be + in a zone the load balancer has a subnet in. :param int weight: (optional) The weight of the server member. If specified, the pool algorithm must be `weighted_round_robin`. :param dict headers: A `dict` containing the request headers @@ -27065,9 +27385,7 @@ def list_private_path_service_gateway_account_policies( path_param_keys = ['private_path_service_gateway_id'] path_param_values = self.encode_path_vars(private_path_service_gateway_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/private_path_service_gateways/{private_path_service_gateway_id}/account_policies'.format( - **path_param_dict - ) + url = '/private_path_service_gateways/{private_path_service_gateway_id}/account_policies'.format(**path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -27152,9 +27470,7 @@ def create_private_path_service_gateway_account_policy( path_param_keys = ['private_path_service_gateway_id'] path_param_values = self.encode_path_vars(private_path_service_gateway_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/private_path_service_gateways/{private_path_service_gateway_id}/account_policies'.format( - **path_param_dict - ) + url = '/private_path_service_gateways/{private_path_service_gateway_id}/account_policies'.format(**path_param_dict) request = self.prepare_request( method='POST', url=url, @@ -27210,9 +27526,7 @@ def delete_private_path_service_gateway_account_policy( path_param_keys = ['private_path_service_gateway_id', 'id'] path_param_values = self.encode_path_vars(private_path_service_gateway_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/private_path_service_gateways/{private_path_service_gateway_id}/account_policies/{id}'.format( - **path_param_dict - ) + url = '/private_path_service_gateways/{private_path_service_gateway_id}/account_policies/{id}'.format(**path_param_dict) request = self.prepare_request( method='DELETE', url=url, @@ -27268,9 +27582,7 @@ def get_private_path_service_gateway_account_policy( path_param_keys = ['private_path_service_gateway_id', 'id'] path_param_values = self.encode_path_vars(private_path_service_gateway_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/private_path_service_gateways/{private_path_service_gateway_id}/account_policies/{id}'.format( - **path_param_dict - ) + url = '/private_path_service_gateways/{private_path_service_gateway_id}/account_policies/{id}'.format(**path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -27313,9 +27625,7 @@ def update_private_path_service_gateway_account_policy( if private_path_service_gateway_account_policy_patch is None: raise ValueError('private_path_service_gateway_account_policy_patch must be provided') if isinstance(private_path_service_gateway_account_policy_patch, PrivatePathServiceGatewayAccountPolicyPatch): - private_path_service_gateway_account_policy_patch = convert_model( - private_path_service_gateway_account_policy_patch - ) + private_path_service_gateway_account_policy_patch = convert_model(private_path_service_gateway_account_policy_patch) headers = {} sdk_headers = get_sdk_headers( service_name=self.DEFAULT_SERVICE_NAME, @@ -27340,9 +27650,7 @@ def update_private_path_service_gateway_account_policy( path_param_keys = ['private_path_service_gateway_id', 'id'] path_param_values = self.encode_path_vars(private_path_service_gateway_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/private_path_service_gateways/{private_path_service_gateway_id}/account_policies/{id}'.format( - **path_param_dict - ) + url = '/private_path_service_gateways/{private_path_service_gateway_id}/account_policies/{id}'.format(**path_param_dict) request = self.prepare_request( method='PATCH', url=url, @@ -27419,9 +27727,7 @@ def list_private_path_service_gateway_endpoint_gateway_bindings( path_param_keys = ['private_path_service_gateway_id'] path_param_values = self.encode_path_vars(private_path_service_gateway_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/private_path_service_gateways/{private_path_service_gateway_id}/endpoint_gateway_bindings'.format( - **path_param_dict - ) + url = '/private_path_service_gateways/{private_path_service_gateway_id}/endpoint_gateway_bindings'.format(**path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -27477,9 +27783,7 @@ def get_private_path_service_gateway_endpoint_gateway_binding( path_param_keys = ['private_path_service_gateway_id', 'id'] path_param_values = self.encode_path_vars(private_path_service_gateway_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/private_path_service_gateways/{private_path_service_gateway_id}/endpoint_gateway_bindings/{id}'.format( - **path_param_dict - ) + url = '/private_path_service_gateways/{private_path_service_gateway_id}/endpoint_gateway_bindings/{id}'.format(**path_param_dict) request = self.prepare_request( method='GET', url=url, @@ -27555,9 +27859,7 @@ def deny_private_path_service_gateway_endpoint_gateway_binding( path_param_keys = ['private_path_service_gateway_id', 'id'] path_param_values = self.encode_path_vars(private_path_service_gateway_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/private_path_service_gateways/{private_path_service_gateway_id}/endpoint_gateway_bindings/{id}/deny'.format( - **path_param_dict - ) + url = '/private_path_service_gateways/{private_path_service_gateway_id}/endpoint_gateway_bindings/{id}/deny'.format(**path_param_dict) request = self.prepare_request( method='POST', url=url, @@ -27636,9 +27938,7 @@ def permit_private_path_service_gateway_endpoint_gateway_binding( path_param_keys = ['private_path_service_gateway_id', 'id'] path_param_values = self.encode_path_vars(private_path_service_gateway_id, id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/private_path_service_gateways/{private_path_service_gateway_id}/endpoint_gateway_bindings/{id}/permit'.format( - **path_param_dict - ) + url = '/private_path_service_gateways/{private_path_service_gateway_id}/endpoint_gateway_bindings/{id}/permit'.format(**path_param_dict) request = self.prepare_request( method='POST', url=url, @@ -27757,9 +28057,7 @@ def revoke_account_for_private_path_service_gateway( path_param_keys = ['private_path_service_gateway_id'] path_param_values = self.encode_path_vars(private_path_service_gateway_id) path_param_dict = dict(zip(path_param_keys, path_param_values)) - url = '/private_path_service_gateways/{private_path_service_gateway_id}/revoke_account'.format( - **path_param_dict - ) + url = '/private_path_service_gateways/{private_path_service_gateway_id}/revoke_account'.format(**path_param_dict) request = self.prepare_request( method='POST', url=url, @@ -27880,7 +28178,6 @@ 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 @@ -27889,7 +28186,6 @@ 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 @@ -27901,6 +28197,37 @@ class UserDataFormat(str, Enum): IPXE = 'ipxe' +class ListInstancesEnums: + """ + Enums for list_instances parameters. + """ + + class ReservationAffinityPolicy(str, Enum): + """ + Filters the collection to instances with a `reservation_affinity.policy` property + matching the specified value. + """ + + AUTOMATIC = 'automatic' + DISABLED = 'disabled' + MANUAL = 'manual' + + +class ListReservationsEnums: + """ + Enums for list_reservations parameters. + """ + + class AffinityPolicy(str, Enum): + """ + Filters the collection to reservations with an `affinity_policy` property matching + the specified value. + """ + + AUTOMATIC = 'automatic' + RESTRICTED = 'restricted' + + class ListVolumesEnums: """ Enums for list_volumes parameters. @@ -27915,7 +28242,6 @@ 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 @@ -27996,7 +28322,6 @@ 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 @@ -28008,6 +28333,24 @@ class ReplicationRole(str, Enum): SOURCE = 'source' +class ListShareSnapshotsEnums: + """ + Enums for list_share_snapshots parameters. + """ + + class Sort(str, Enum): + """ + Sorts the returned collection by the specified property name in ascending order. A + `-` may be prepended to the name to sort in descending order. For example, the + value `-created_at` sorts the collection by the `created_at` property in + descending order, and the value `name` sorts it by the `name` property in + ascending order. + """ + + CREATED_AT = 'created_at' + NAME = 'name' + + class ListBackupPolicyJobsEnums: """ Enums for list_backup_policy_jobs parameters. @@ -28022,7 +28365,6 @@ 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 @@ -28194,7 +28536,6 @@ 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 @@ -28429,6 +28770,7 @@ class ResourceTypeEnum(str, Enum): ACCOUNT = 'account' + class AddressPrefix: """ AddressPrefix. @@ -28873,7 +29215,7 @@ 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', 'BackupPolicyMatchResourceTypeShare']) ) raise Exception(msg) @@ -28894,6 +29236,7 @@ class HealthStateEnum(str, Enum): INAPPLICABLE = 'inapplicable' OK = 'ok' + class LifecycleStateEnum(str, Enum): """ The lifecycle state of the backup policy. @@ -28907,6 +29250,7 @@ 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 @@ -28917,8 +29261,10 @@ class MatchResourceTypeEnum(str, Enum): """ INSTANCE = 'instance' + SHARE = 'share' VOLUME = 'volume' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -28927,6 +29273,7 @@ class ResourceTypeEnum(str, Enum): BACKUP_POLICY = 'backup_policy' + class BackupPolicyCollection: """ BackupPolicyCollection. @@ -29130,6 +29477,7 @@ class CodeEnum(str, Enum): MISSING_SERVICE_AUTHORIZATION_POLICIES = 'missing_service_authorization_policies' + class BackupPolicyJob: """ BackupPolicyJob. @@ -29164,8 +29512,8 @@ class BackupPolicyJob: future. :param List[BackupPolicyJobStatusReason] status_reasons: The reasons for the current status (if any). - :param List[SnapshotReference] target_snapshots: The snapshots operated on by - this backup policy job (may be + :param List[BackupPolicyTargetSnapshot] target_snapshots: The snapshots operated + on by this backup policy job (may be [deleted](https://cloud.ibm.com/apidocs/vpc#deleted-resources)). """ @@ -29182,7 +29530,7 @@ def __init__( source: 'BackupPolicyJobSource', status: str, status_reasons: List['BackupPolicyJobStatusReason'], - target_snapshots: List['SnapshotReference'], + target_snapshots: List['BackupPolicyTargetSnapshot'], *, completed_at: Optional[datetime] = None, ) -> None: @@ -29216,8 +29564,8 @@ def __init__( future. :param List[BackupPolicyJobStatusReason] status_reasons: The reasons for the current status (if any). - :param List[SnapshotReference] target_snapshots: The snapshots operated on - by this backup policy job (may be + :param List[BackupPolicyTargetSnapshot] target_snapshots: The snapshots + operated on by this backup policy job (may be [deleted](https://cloud.ibm.com/apidocs/vpc#deleted-resources)). :param datetime completed_at: (optional) The date and time that the backup policy job was completed. @@ -29288,7 +29636,7 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyJob': else: 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'] = target_snapshots else: raise ValueError('Required property \'target_snapshots\' not present in BackupPolicyJob JSON') return cls(**args) @@ -29376,6 +29724,7 @@ class JobTypeEnum(str, Enum): CREATION = 'creation' DELETION = 'deletion' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -29383,6 +29732,7 @@ class ResourceTypeEnum(str, Enum): BACKUP_POLICY_JOB = 'backup_policy_job' + class StatusEnum(str, Enum): """ The status of the backup policy job. @@ -29396,6 +29746,7 @@ class StatusEnum(str, Enum): SUCCEEDED = 'succeeded' + class BackupPolicyJobCollection: """ BackupPolicyJobCollection. @@ -29527,7 +29878,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join(['BackupPolicyJobSourceVolumeReference', 'BackupPolicyJobSourceInstanceReference']) + ", ".join(['BackupPolicyJobSourceVolumeReference', 'BackupPolicyJobSourceInstanceReference', 'BackupPolicyJobSourceShareReference']) ) raise Exception(msg) @@ -29541,6 +29892,14 @@ class BackupPolicyJobStatusReason: - `snapshot_encryption_key_invalid`: The provided encryption key is unavailable - `snapshot_pending`: Cannot delete backup (snapshot) in the `pending` lifecycle state + - `snapshot_source_unsupported`: The source access control mode does not support + backups + - `snapshot_rate_too_high`: The rate of backups for the resource is too high + - `snapshot_share_limit`: The maximum limit for snapshots on this resource has + been + reached + - `snapshot_source_unavailable`: The source data is not available (for example, + because the source is still being created). - `snapshot_volume_limit`: The snapshot limit for the source volume has been reached - `source_volume_busy`: The source volume has `busy` set (after multiple @@ -29572,6 +29931,17 @@ def __init__( unavailable - `snapshot_pending`: Cannot delete backup (snapshot) in the `pending` lifecycle state + - `snapshot_source_unsupported`: The source access control mode does not + support + backups + - `snapshot_rate_too_high`: The rate of backups for the resource is too + high + - `snapshot_share_limit`: The maximum limit for snapshots on this resource + has been + reached + - `snapshot_source_unavailable`: The source data is not available (for + example, + because the source is still being created). - `snapshot_volume_limit`: The snapshot limit for the source volume has been reached - `source_volume_busy`: The source volume has `busy` set (after multiple @@ -29649,6 +30019,14 @@ class CodeEnum(str, Enum): - `snapshot_encryption_key_invalid`: The provided encryption key is unavailable - `snapshot_pending`: Cannot delete backup (snapshot) in the `pending` lifecycle state + - `snapshot_source_unsupported`: The source access control mode does not support + backups + - `snapshot_rate_too_high`: The rate of backups for the resource is too high + - `snapshot_share_limit`: The maximum limit for snapshots on this resource has + been + reached + - `snapshot_source_unavailable`: The source data is not available (for example, + because the source is still being created). - `snapshot_volume_limit`: The snapshot limit for the source volume has been reached - `source_volume_busy`: The source volume has `busy` set (after multiple retries) @@ -29664,12 +30042,17 @@ class CodeEnum(str, Enum): INTERNAL_ERROR = 'internal_error' SNAPSHOT_ENCRYPTION_KEY_INVALID = 'snapshot_encryption_key_invalid' SNAPSHOT_PENDING = 'snapshot_pending' + SNAPSHOT_RATE_TOO_HIGH = 'snapshot_rate_too_high' + SNAPSHOT_SHARE_LIMIT = 'snapshot_share_limit' + SNAPSHOT_SOURCE_UNAVAILABLE = 'snapshot_source_unavailable' + SNAPSHOT_SOURCE_UNSUPPORTED = 'snapshot_source_unsupported' SNAPSHOT_VOLUME_LIMIT = 'snapshot_volume_limit' SOURCE_VOLUME_BUSY = 'source_volume_busy' SOURCE_VOLUME_TOO_LARGE = 'source_volume_too_large' SOURCE_VOLUME_UNAVAILABLE = 'source_volume_unavailable' + class BackupPolicyPatch: """ BackupPolicyPatch. @@ -29765,6 +30148,7 @@ class IncludedContentEnum(str, Enum): DATA_VOLUMES = 'data_volumes' + class BackupPolicyPlan: """ BackupPolicyPlan. @@ -29900,9 +30284,7 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyPlan': 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 - ] + 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: @@ -29990,6 +30372,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -29998,6 +30381,7 @@ class ResourceTypeEnum(str, Enum): BACKUP_POLICY_PLAN = 'backup_policy_plan' + class BackupPolicyPlanClonePolicy: """ BackupPolicyPlanClonePolicy. @@ -30650,9 +31034,7 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyPlanPatch': 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 - ] + args['remote_region_policies'] = [BackupPolicyPlanRemoteRegionPolicyPrototype.from_dict(v) for v in remote_region_policies] return cls(**args) @classmethod @@ -30803,9 +31185,7 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyPlanPrototype': 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 - ] + args['remote_region_policies'] = [BackupPolicyPlanRemoteRegionPolicyPrototype.from_dict(v) for v in remote_region_policies] return cls(**args) @classmethod @@ -30994,6 +31374,7 @@ class ResourceTypeEnum(str, Enum): BACKUP_POLICY_PLAN = 'backup_policy_plan' + class BackupPolicyPlanRemote: """ If present, this property indicates that the resource associated with this reference @@ -31099,15 +31480,11 @@ 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) 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: @@ -31203,9 +31580,7 @@ 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 @@ -31306,12 +31681,7 @@ 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', 'BackupPolicyPrototypeBackupPolicyMatchResourceTypeSharePrototype']) ) raise Exception(msg) @@ -31322,9 +31692,11 @@ class MatchResourceTypeEnum(str, Enum): """ INSTANCE = 'instance' + SHARE = 'share' VOLUME = 'volume' + class BackupPolicyScope: """ The scope for this backup policy. @@ -31364,6 +31736,25 @@ def __init__( raise Exception(msg) +class BackupPolicyTargetSnapshot: + """ + BackupPolicyTargetSnapshot. + + """ + + def __init__( + self, + ) -> None: + """ + Initialize a BackupPolicyTargetSnapshot object. + + """ + msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( + ", ".join(['BackupPolicyTargetSnapshotSnapshotReference', 'BackupPolicyTargetSnapshotShareSnapshotReference']) + ) + raise Exception(msg) + + class BareMetalServer: """ BareMetalServer. @@ -31387,6 +31778,31 @@ class BareMetalServer: enabled, the image must support secure boot or the server will fail to boot. :param BareMetalServerFirmware firmware: Firmware information for the bare metal server. + :param List[BareMetalServerHealthReason] health_reasons: The reasons for the + current server `health_state` (if any): + - `reservation_capacity_unavailable`: The reservation affinity pool has no + available capacity. + - `reservation_deleted`: The reservation affinity pool has a deleted + reservation. + - `reservation_expired`: The reservation affinity pool has an expired + reservation. + - `reservation_failed`: The reservation affinity pool has a failed reservation. + See [health status + reasons](https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons) + for details. The enumerated values for this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. + :param str health_state: The health of this resource: + - `ok`: No abnormal behavior detected + - `degraded`: Experiencing compromised performance, capacity, or connectivity + - `faulted`: Completely unreachable, inoperative, or otherwise entirely + incapacitated + - `inapplicable`: The health state does not apply because of the current + lifecycle + state. A resource with a lifecycle state of `failed` or `deleting` will have + a + health state of `inapplicable`. A `pending` resource may also have this + state. :param str href: The URL for this bare metal server. :param str id: The unique identifier for this bare metal server. :param List[BareMetalServerLifecycleReason] lifecycle_reasons: The reasons for @@ -31419,6 +31835,10 @@ class BareMetalServer: :param BareMetalServerProfileReference profile: The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-bare-metal-servers-profile) for this bare metal server. + :param ReservationReference reservation: (optional) The reservation used by this + bare metal server. + If absent, no reservation is in use. + :param BareMetalServerReservationAffinity reservation_affinity: :param ResourceGroupReference resource_group: The resource group for this bare metal server. :param str resource_type: The resource type. @@ -31452,6 +31872,8 @@ def __init__( disks: List['BareMetalServerDisk'], enable_secure_boot: bool, firmware: 'BareMetalServerFirmware', + health_reasons: List['BareMetalServerHealthReason'], + health_state: str, href: str, id: str, lifecycle_reasons: List['BareMetalServerLifecycleReason'], @@ -31461,6 +31883,7 @@ def __init__( network_interfaces: List['NetworkInterfaceBareMetalServerContextReference'], primary_network_interface: 'NetworkInterfaceBareMetalServerContextReference', profile: 'BareMetalServerProfileReference', + reservation_affinity: 'BareMetalServerReservationAffinity', resource_group: 'ResourceGroupReference', resource_type: str, status: str, @@ -31471,6 +31894,7 @@ def __init__( *, network_attachments: Optional[List['BareMetalServerNetworkAttachmentReference']] = None, primary_network_attachment: Optional['BareMetalServerNetworkAttachmentReference'] = None, + reservation: Optional['ReservationReference'] = None, ) -> None: """ Initialize a BareMetalServer object. @@ -31495,6 +31919,33 @@ def __init__( boot. :param BareMetalServerFirmware firmware: Firmware information for the bare metal server. + :param List[BareMetalServerHealthReason] health_reasons: The reasons for + the current server `health_state` (if any): + - `reservation_capacity_unavailable`: The reservation affinity pool has no + available capacity. + - `reservation_deleted`: The reservation affinity pool has a deleted + reservation. + - `reservation_expired`: The reservation affinity pool has an expired + reservation. + - `reservation_failed`: The reservation affinity pool has a failed + reservation. + See [health status + reasons](https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons) + for details. The enumerated values for this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. + :param str health_state: The health of this resource: + - `ok`: No abnormal behavior detected + - `degraded`: Experiencing compromised performance, capacity, or + connectivity + - `faulted`: Completely unreachable, inoperative, or otherwise entirely + incapacitated + - `inapplicable`: The health state does not apply because of the current + lifecycle + state. A resource with a lifecycle state of `failed` or `deleting` will + have a + health state of `inapplicable`. A `pending` resource may also have this + state. :param str href: The URL for this bare metal server. :param str id: The unique identifier for this bare metal server. :param List[BareMetalServerLifecycleReason] lifecycle_reasons: The reasons @@ -31524,6 +31975,7 @@ def __init__( :param BareMetalServerProfileReference profile: The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-bare-metal-servers-profile) for this bare metal server. + :param BareMetalServerReservationAffinity reservation_affinity: :param ResourceGroupReference resource_group: The resource group for this bare metal server. :param str resource_type: The resource type. @@ -31551,6 +32003,9 @@ def __init__( :param BareMetalServerNetworkAttachmentReference primary_network_attachment: (optional) The primary network attachment for this bare metal server. + :param ReservationReference reservation: (optional) The reservation used by + this bare metal server. + If absent, no reservation is in use. """ self.bandwidth = bandwidth self.boot_target = boot_target @@ -31560,6 +32015,8 @@ def __init__( self.disks = disks self.enable_secure_boot = enable_secure_boot self.firmware = firmware + self.health_reasons = health_reasons + self.health_state = health_state self.href = href self.id = id self.lifecycle_reasons = lifecycle_reasons @@ -31571,6 +32028,8 @@ def __init__( self.primary_network_attachment = primary_network_attachment self.primary_network_interface = primary_network_interface self.profile = profile + self.reservation = reservation + self.reservation_affinity = reservation_affinity self.resource_group = resource_group self.resource_type = resource_type self.status = status @@ -31615,6 +32074,14 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServer': args['firmware'] = BareMetalServerFirmware.from_dict(firmware) else: raise ValueError('Required property \'firmware\' not present in BareMetalServer JSON') + if (health_reasons := _dict.get('health_reasons')) is not None: + args['health_reasons'] = [BareMetalServerHealthReason.from_dict(v) for v in health_reasons] + else: + raise ValueError('Required property \'health_reasons\' not present in BareMetalServer 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 BareMetalServer JSON') if (href := _dict.get('href')) is not None: args['href'] = href else: @@ -31640,29 +32107,27 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServer': 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 - ] + 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 - ) + 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 - ) + 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') + 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'] = BareMetalServerReservationAffinity.from_dict(reservation_affinity) + else: + raise ValueError('Required property \'reservation_affinity\' not present in BareMetalServer JSON') if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = ResourceGroupReference.from_dict(resource_group) else: @@ -31732,6 +32197,16 @@ def to_dict(self) -> Dict: _dict['firmware'] = self.firmware else: _dict['firmware'] = self.firmware.to_dict() + if hasattr(self, 'health_reasons') and self.health_reasons is not None: + health_reasons_list = [] + for v in self.health_reasons: + if isinstance(v, dict): + health_reasons_list.append(v) + else: + health_reasons_list.append(v.to_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, 'href') and self.href is not None: _dict['href'] = self.href if hasattr(self, 'id') and self.id is not None: @@ -31781,6 +32256,16 @@ def to_dict(self) -> Dict: _dict['profile'] = self.profile else: _dict['profile'] = self.profile.to_dict() + if hasattr(self, 'reservation') and self.reservation is not None: + if isinstance(self.reservation, 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 isinstance(self.reservation_affinity, dict): + _dict['reservation_affinity'] = self.reservation_affinity + else: + _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 @@ -31833,6 +32318,24 @@ def __ne__(self, other: 'BareMetalServer') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class HealthStateEnum(str, Enum): + """ + The health of this resource: + - `ok`: No abnormal behavior detected + - `degraded`: Experiencing compromised performance, capacity, or connectivity + - `faulted`: Completely unreachable, inoperative, or otherwise entirely + incapacitated + - `inapplicable`: The health state does not apply because of the current lifecycle + state. A resource with a lifecycle state of `failed` or `deleting` will have a + health state of `inapplicable`. A `pending` resource may also have this state. + """ + + DEGRADED = 'degraded' + FAULTED = 'faulted' + INAPPLICABLE = 'inapplicable' + OK = 'ok' + + class LifecycleStateEnum(str, Enum): """ The lifecycle state of the bare metal server. @@ -31846,6 +32349,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -31853,6 +32357,7 @@ class ResourceTypeEnum(str, Enum): BARE_METAL_SERVER = 'bare_metal_server' + class StatusEnum(str, Enum): """ The status of this bare metal server: @@ -31881,6 +32386,7 @@ class StatusEnum(str, Enum): STOPPED = 'stopped' + class BareMetalServerBootTarget: """ The resource from which this bare metal server is booted. @@ -32235,6 +32741,7 @@ class ConsoleTypeEnum(str, Enum): VNC = 'vnc' + class BareMetalServerDisk: """ BareMetalServerDisk. @@ -32382,6 +32889,7 @@ class InterfaceTypeEnum(str, Enum): NVME = 'nvme' SATA = 'sata' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -32390,6 +32898,7 @@ class ResourceTypeEnum(str, Enum): BARE_METAL_SERVER_DISK = 'bare_metal_server_disk' + class BareMetalServerDiskCollection: """ BareMetalServerDiskCollection. @@ -32593,6 +33102,98 @@ class UpdateEnum(str, Enum): REQUIRED = 'required' + +class BareMetalServerHealthReason: + """ + BareMetalServerHealthReason. + + :param str code: A reason code for this health state. + :param str message: An explanation of the reason for this health state. + :param str more_info: (optional) Link to documentation about the reason for this + health state. + """ + + def __init__( + self, + code: str, + message: str, + *, + more_info: Optional[str] = None, + ) -> None: + """ + Initialize a BareMetalServerHealthReason object. + + :param str code: A reason code for this health state. + :param str message: An explanation of the reason for this health state. + :param str more_info: (optional) Link to documentation about the reason for + this health state. + """ + self.code = code + self.message = message + self.more_info = more_info + + @classmethod + def from_dict(cls, _dict: Dict) -> 'BareMetalServerHealthReason': + """Initialize a BareMetalServerHealthReason 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 BareMetalServerHealthReason JSON') + if (message := _dict.get('message')) is not None: + args['message'] = message + else: + raise ValueError('Required property \'message\' not present in BareMetalServerHealthReason 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 BareMetalServerHealthReason 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 BareMetalServerHealthReason object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'BareMetalServerHealthReason') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'BareMetalServerHealthReason') -> 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 health state. + """ + + RESERVATION_CAPACITY_UNAVAILABLE = 'reservation_capacity_unavailable' + RESERVATION_DELETED = 'reservation_deleted' + RESERVATION_EXPIRED = 'reservation_expired' + RESERVATION_FAILED = 'reservation_failed' + + + class BareMetalServerInitialization: """ BareMetalServerInitialization. @@ -32926,6 +33527,7 @@ class CodeEnum(str, Enum): RESOURCE_SUSPENDED_BY_PROVIDER = 'resource_suspended_by_provider' + class BareMetalServerNetworkAttachment: """ BareMetalServerNetworkAttachment. @@ -33058,6 +33660,7 @@ class InterfaceTypeEnum(str, Enum): PCI = 'pci' VLAN = 'vlan' + class LifecycleStateEnum(str, Enum): """ The lifecycle state of the bare metal server network attachment. @@ -33071,6 +33674,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -33078,6 +33682,7 @@ 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. @@ -33090,6 +33695,7 @@ class TypeEnum(str, Enum): SECONDARY = 'secondary' + class BareMetalServerNetworkAttachmentCollection: """ BareMetalServerNetworkAttachmentCollection. @@ -33140,29 +33746,21 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkAttachmentCollection': if (first := _dict.get('first')) is not None: args['first'] = PageLink.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' - ) + 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'] = PageLink.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 @@ -33364,12 +33962,7 @@ 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) @@ -33394,6 +33987,7 @@ class InterfaceTypeEnum(str, Enum): VLAN = 'vlan' + class BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface: """ A virtual network interface for the bare metal server network attachment. This can be @@ -33412,12 +34006,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext', - 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity', - ] - ) + ", ".join(['BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext', 'BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity']) ) raise Exception(msg) @@ -33511,29 +34100,19 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkAttachmentReference': 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') if (virtual_network_interface := _dict.get('virtual_network_interface')) is not None: - args['virtual_network_interface'] = VirtualNetworkInterfaceReferenceAttachmentContext.from_dict( - virtual_network_interface - ) + args['virtual_network_interface'] = VirtualNetworkInterfaceReferenceAttachmentContext.from_dict(virtual_network_interface) else: - raise ValueError( - 'Required property \'virtual_network_interface\' not present in BareMetalServerNetworkAttachmentReference JSON' - ) + raise ValueError('Required property \'virtual_network_interface\' not present in BareMetalServerNetworkAttachmentReference JSON') return cls(**args) @classmethod @@ -33600,6 +34179,7 @@ class ResourceTypeEnum(str, Enum): BARE_METAL_SERVER_NETWORK_ATTACHMENT = 'bare_metal_server_network_attachment' + class BareMetalServerNetworkInterface: """ BareMetalServerNetworkInterface. @@ -33881,13 +34461,7 @@ 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) @@ -33898,13 +34472,7 @@ 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) @@ -33921,9 +34489,7 @@ 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) @@ -33965,6 +34531,7 @@ class InterfaceTypeEnum(str, Enum): PCI = 'pci' VLAN = 'vlan' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -33972,6 +34539,7 @@ class ResourceTypeEnum(str, Enum): NETWORK_INTERFACE = 'network_interface' + class StatusEnum(str, Enum): """ The status of the bare metal server network interface. @@ -33986,6 +34554,7 @@ class StatusEnum(str, Enum): FAILED = 'failed' PENDING = 'pending' + class TypeEnum(str, Enum): """ The bare metal server network interface type. @@ -34000,6 +34569,7 @@ class TypeEnum(str, Enum): SECONDARY = 'secondary' + class BareMetalServerNetworkInterfaceCollection: """ BareMetalServerNetworkInterfaceCollection. @@ -34050,29 +34620,21 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkInterfaceCollection': if (first := _dict.get('first')) is not None: args['first'] = PageLink.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] 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'] = PageLink.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 @@ -34408,13 +34970,7 @@ 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) @@ -34425,13 +34981,7 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkInterfacePrototype': 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) @@ -34443,16 +34993,12 @@ def _from_dict(cls, _dict: Dict): @classmethod def _get_class_by_discriminator(cls, _dict: Dict) -> object: mapping = {} - mapping['hipersocket'] = ( - 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype' - ) + 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) @@ -34490,6 +35036,7 @@ class InterfaceTypeEnum(str, Enum): VLAN = 'vlan' + class BareMetalServerPatch: """ BareMetalServerPatch. @@ -34505,6 +35052,7 @@ class BareMetalServerPatch: :param str name: (optional) The name for this bare metal server. The name must not be used by another bare metal server in the region. Changing the name will not affect the system hostname. + :param BareMetalServerReservationAffinityPatch reservation_affinity: (optional) :param BareMetalServerTrustedPlatformModulePatch trusted_platform_module: (optional) """ @@ -34515,6 +35063,7 @@ def __init__( bandwidth: Optional[int] = None, enable_secure_boot: Optional[bool] = None, name: Optional[str] = None, + reservation_affinity: Optional['BareMetalServerReservationAffinityPatch'] = None, trusted_platform_module: Optional['BareMetalServerTrustedPlatformModulePatch'] = None, ) -> None: """ @@ -34533,12 +35082,15 @@ def __init__( :param str name: (optional) The name for this bare metal server. The name must not be used by another bare metal server in the region. Changing the name will not affect the system hostname. + :param BareMetalServerReservationAffinityPatch reservation_affinity: + (optional) :param BareMetalServerTrustedPlatformModulePatch trusted_platform_module: (optional) """ self.bandwidth = bandwidth self.enable_secure_boot = enable_secure_boot self.name = name + self.reservation_affinity = reservation_affinity self.trusted_platform_module = trusted_platform_module @classmethod @@ -34551,10 +35103,10 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerPatch': args['enable_secure_boot'] = enable_secure_boot if (name := _dict.get('name')) is not None: args['name'] = name + if (reservation_affinity := _dict.get('reservation_affinity')) is not None: + args['reservation_affinity'] = BareMetalServerReservationAffinityPatch.from_dict(reservation_affinity) if (trusted_platform_module := _dict.get('trusted_platform_module')) is not None: - args['trusted_platform_module'] = BareMetalServerTrustedPlatformModulePatch.from_dict( - trusted_platform_module - ) + args['trusted_platform_module'] = BareMetalServerTrustedPlatformModulePatch.from_dict(trusted_platform_module) return cls(**args) @classmethod @@ -34571,6 +35123,11 @@ def to_dict(self) -> Dict: _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, '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, '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 @@ -34661,11 +35218,7 @@ 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) @@ -34685,6 +35238,7 @@ class InterfaceTypeEnum(str, Enum): PCI = 'pci' + class BareMetalServerPrimaryNetworkInterfacePrototype: """ BareMetalServerPrimaryNetworkInterfacePrototype. @@ -34862,9 +35416,7 @@ 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 @@ -34943,6 +35495,7 @@ class InterfaceTypeEnum(str, Enum): PCI = 'pci' + class BareMetalServerProfile: """ BareMetalServerProfile. @@ -34962,6 +35515,7 @@ class BareMetalServerProfile: :param BareMetalServerProfileNetworkAttachmentCount network_attachment_count: :param BareMetalServerProfileNetworkInterfaceCount network_interface_count: :param BareMetalServerProfileOSArchitecture os_architecture: + :param BareMetalServerProfileReservationTerms reservation_terms: :param str resource_type: The resource type. :param BareMetalServerProfileSupportedTrustedPlatformModuleModes supported_trusted_platform_module_modes: The supported trusted platform module @@ -34986,6 +35540,7 @@ def __init__( network_attachment_count: 'BareMetalServerProfileNetworkAttachmentCount', network_interface_count: 'BareMetalServerProfileNetworkInterfaceCount', os_architecture: 'BareMetalServerProfileOSArchitecture', + reservation_terms: 'BareMetalServerProfileReservationTerms', resource_type: str, supported_trusted_platform_module_modes: 'BareMetalServerProfileSupportedTrustedPlatformModuleModes', virtual_network_interfaces_supported: 'BareMetalServerProfileVirtualNetworkInterfacesSupported', @@ -35010,6 +35565,7 @@ def __init__( network_attachment_count: :param BareMetalServerProfileNetworkInterfaceCount network_interface_count: :param BareMetalServerProfileOSArchitecture os_architecture: + :param BareMetalServerProfileReservationTerms reservation_terms: :param str resource_type: The resource type. :param BareMetalServerProfileSupportedTrustedPlatformModuleModes supported_trusted_platform_module_modes: The supported trusted platform @@ -35031,6 +35587,7 @@ def __init__( self.network_attachment_count = network_attachment_count self.network_interface_count = network_interface_count self.os_architecture = os_architecture + self.reservation_terms = reservation_terms self.resource_type = resource_type self.supported_trusted_platform_module_modes = supported_trusted_platform_module_modes self.virtual_network_interfaces_supported = virtual_network_interfaces_supported @@ -35082,9 +35639,7 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfile': 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' - ) + 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: @@ -35093,30 +35648,22 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfile': args['os_architecture'] = BareMetalServerProfileOSArchitecture.from_dict(os_architecture) else: raise ValueError('Required property \'os_architecture\' not present in BareMetalServerProfile JSON') + if (reservation_terms := _dict.get('reservation_terms')) is not None: + args['reservation_terms'] = BareMetalServerProfileReservationTerms.from_dict(reservation_terms) + else: + raise ValueError('Required property \'reservation_terms\' 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 - ) - ) + 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' - ) + 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) - ) + 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 \'virtual_network_interfaces_supported\' not present in BareMetalServerProfile JSON') return cls(**args) @classmethod @@ -35186,22 +35733,19 @@ def to_dict(self) -> Dict: _dict['os_architecture'] = self.os_architecture else: _dict['os_architecture'] = self.os_architecture.to_dict() + 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, '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.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 else: @@ -35234,6 +35778,7 @@ class ResourceTypeEnum(str, Enum): BARE_METAL_SERVER_PROFILE = 'bare_metal_server_profile' + class BareMetalServerProfileBandwidth: """ BareMetalServerProfileBandwidth. @@ -35248,14 +35793,7 @@ def __init__( """ 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) @@ -35349,6 +35887,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class BareMetalServerProfileCPUCoreCount: """ BareMetalServerProfileCPUCoreCount. @@ -35363,14 +35902,7 @@ def __init__( """ 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) @@ -35389,14 +35921,7 @@ def __init__( """ 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) @@ -35596,6 +36121,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class ValuesEnum(str, Enum): """ A console type. @@ -35605,6 +36131,7 @@ class ValuesEnum(str, Enum): VNC = 'vnc' + class BareMetalServerProfileDisk: """ Disks provided by this profile. @@ -35645,13 +36172,9 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileDisk': 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 - ) + 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 \'supported_interface_types\' not present in BareMetalServerProfileDisk JSON') return cls(**args) @classmethod @@ -35712,14 +36235,7 @@ def __init__( """ 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) @@ -35738,14 +36254,7 @@ def __init__( """ 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) @@ -35785,21 +36294,15 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileDiskSupportedInterface 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 @@ -35845,6 +36348,7 @@ class DefaultEnum(str, Enum): NVME = 'nvme' SATA = 'sata' + class TypeEnum(str, Enum): """ The type for this profile field. @@ -35852,6 +36356,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class ValuesEnum(str, Enum): """ The disk attachment interface used: @@ -35868,6 +36373,7 @@ class ValuesEnum(str, Enum): SATA = 'sata' + class BareMetalServerProfileIdentity: """ Identifies a bare metal server profile by a unique property. @@ -35901,14 +36407,7 @@ def __init__( """ 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) @@ -35927,12 +36426,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'BareMetalServerProfileNetworkAttachmentCountRange', - 'BareMetalServerProfileNetworkAttachmentCountDependent', - ] - ) + ", ".join(['BareMetalServerProfileNetworkAttachmentCountRange', 'BareMetalServerProfileNetworkAttachmentCountDependent']) ) raise Exception(msg) @@ -35951,12 +36445,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'BareMetalServerProfileNetworkInterfaceCountRange', - 'BareMetalServerProfileNetworkInterfaceCountDependent', - ] - ) + ", ".join(['BareMetalServerProfileNetworkInterfaceCountRange', 'BareMetalServerProfileNetworkInterfaceCountDependent']) ) raise Exception(msg) @@ -36051,6 +36540,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class BareMetalServerProfileReference: """ BareMetalServerProfileReference. @@ -36137,6 +36627,95 @@ class ResourceTypeEnum(str, Enum): BARE_METAL_SERVER_PROFILE = 'bare_metal_server_profile' + +class BareMetalServerProfileReservationTerms: + """ + BareMetalServerProfileReservationTerms. + + :param str type: The type for this profile field. + :param List[str] values: The supported committed use terms for a reservation + using this profile. + """ + + def __init__( + self, + type: str, + values: List[str], + ) -> None: + """ + Initialize a BareMetalServerProfileReservationTerms object. + + :param str type: The type for this profile field. + :param List[str] values: The supported committed use terms for a + reservation using this profile. + """ + self.type = type + self.values = values + + @classmethod + def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileReservationTerms': + """Initialize a BareMetalServerProfileReservationTerms 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 BareMetalServerProfileReservationTerms JSON') + if (values := _dict.get('values')) is not None: + args['values'] = values + else: + raise ValueError('Required property \'values\' not present in BareMetalServerProfileReservationTerms JSON') + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a BareMetalServerProfileReservationTerms 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, '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 BareMetalServerProfileReservationTerms object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'BareMetalServerProfileReservationTerms') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'BareMetalServerProfileReservationTerms') -> 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 ValuesEnum(str, Enum): + """ + values. + """ + + ONE_YEAR = 'one_year' + THREE_YEAR = 'three_year' + + + class BareMetalServerProfileSupportedTrustedPlatformModuleModes: """ The supported trusted platform module modes for this bare metal server profile. @@ -36175,15 +36754,11 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileSupportedTrustedPlatfo 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 @@ -36228,6 +36803,7 @@ class DefaultEnum(str, Enum): DISABLED = 'disabled' TPM_2 = 'tpm_2' + class TypeEnum(str, Enum): """ The type for this profile field. @@ -36235,6 +36811,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class ValuesEnum(str, Enum): """ The trusted platform module (TPM) mode: @@ -36249,6 +36826,7 @@ class ValuesEnum(str, Enum): TPM_2 = 'tpm_2' + class BareMetalServerProfileVirtualNetworkInterfacesSupported: """ Indicates whether this profile supports virtual network interfaces. @@ -36278,15 +36856,11 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileVirtualNetworkInterfac 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 @@ -36329,6 +36903,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class BareMetalServerPrototype: """ BareMetalServerPrototype. @@ -36348,6 +36923,8 @@ class BareMetalServerPrototype: :param BareMetalServerProfileIdentity profile: The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-bare-metal-servers-profile) to use for this bare metal server. + :param BareMetalServerReservationAffinityPrototype reservation_affinity: + (optional) :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 @@ -36371,6 +36948,7 @@ def __init__( bandwidth: Optional[int] = None, enable_secure_boot: Optional[bool] = None, name: Optional[str] = None, + reservation_affinity: Optional['BareMetalServerReservationAffinityPrototype'] = None, resource_group: Optional['ResourceGroupIdentity'] = None, trusted_platform_module: Optional['BareMetalServerTrustedPlatformModulePrototype'] = None, vpc: Optional['VPCIdentity'] = None, @@ -36395,6 +36973,8 @@ def __init__( must not be used by another bare metal server in the region. If unspecified, the name will be a hyphenated list of randomly-selected words. The system hostname will be based on this name. + :param BareMetalServerReservationAffinityPrototype reservation_affinity: + (optional) :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 @@ -36408,21 +36988,358 @@ 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) +class BareMetalServerReservationAffinity: + """ + BareMetalServerReservationAffinity. + + :param str policy: The reservation affinity policy to use for this bare metal + server: + - `disabled`: Reservations will not be used + - `manual`: Reservations in `pool` are available for use + - `automatic`: Any reservations with an `affinity_policy` of `automatic` + that have the same `profile` and `zone` as this bare metal server + are available for use. + :param List[ReservationReference] pool: The pool of reservations available for + use by this bare metal server when the `policy` is `manual`. This must be empty + if the `policy` is `automatic` or + `disabled`. + """ + + def __init__( + self, + policy: str, + pool: List['ReservationReference'], + ) -> None: + """ + Initialize a BareMetalServerReservationAffinity object. + + :param str policy: The reservation affinity policy to use for this bare + metal server: + - `disabled`: Reservations will not be used + - `manual`: Reservations in `pool` are available for use + - `automatic`: Any reservations with an `affinity_policy` of `automatic` + that have the same `profile` and `zone` as this bare metal server + are available for use. + :param List[ReservationReference] pool: The pool of reservations available + for use by this bare metal server when the `policy` is `manual`. This must + be empty if the `policy` is `automatic` or + `disabled`. + """ + self.policy = policy + self.pool = pool + + @classmethod + def from_dict(cls, _dict: Dict) -> 'BareMetalServerReservationAffinity': + """Initialize a BareMetalServerReservationAffinity object from a json dictionary.""" + args = {} + if (policy := _dict.get('policy')) is not None: + args['policy'] = policy + else: + raise ValueError('Required property \'policy\' not present in BareMetalServerReservationAffinity 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 BareMetalServerReservationAffinity JSON') + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a BareMetalServerReservationAffinity 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, 'policy') and self.policy is not None: + _dict['policy'] = self.policy + if hasattr(self, 'pool') and self.pool is not None: + pool_list = [] + for v in self.pool: + if isinstance(v, dict): + pool_list.append(v) + else: + pool_list.append(v.to_dict()) + _dict['pool'] = pool_list + 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 BareMetalServerReservationAffinity object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'BareMetalServerReservationAffinity') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'BareMetalServerReservationAffinity') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + class PolicyEnum(str, Enum): + """ + The reservation affinity policy to use for this bare metal server: + - `disabled`: Reservations will not be used + - `manual`: Reservations in `pool` are available for use + - `automatic`: Any reservations with an `affinity_policy` of `automatic` + that have the same `profile` and `zone` as this bare metal server + are available for use. + """ + + AUTOMATIC = 'automatic' + DISABLED = 'disabled' + MANUAL = 'manual' + + + +class BareMetalServerReservationAffinityPatch: + """ + BareMetalServerReservationAffinityPatch. + + :param str policy: (optional) The reservation affinity policy to use for this + bare metal server: + - `disabled`: Reservations will not be used + - `manual`: Reservations in `pool` will be available for use + - `automatic`: Any reservations with an `affinity_policy` of `automatic` that + have the + same `profile` and `zone` as this bare metal server are available for use. + :param List[ReservationIdentity] pool: (optional) The pool of reservations + available for use by this bare metal server, replacing the existing pool of + reservations. + Specified reservations must have a `status` of `active`, and have the same + `profile` and `zone` as this bare metal server. + If `policy` is `manual`, `pool` must have one reservation. If `policy` is + `disabled` or `automatic`, `pool` must be empty. If `policy` is `manual`, the + `pool` must contain a reservation with available capacity. + """ + + def __init__( + self, + *, + policy: Optional[str] = None, + pool: Optional[List['ReservationIdentity']] = None, + ) -> None: + """ + Initialize a BareMetalServerReservationAffinityPatch object. + + :param str policy: (optional) The reservation affinity policy to use for + this bare metal server: + - `disabled`: Reservations will not be used + - `manual`: Reservations in `pool` will be available for use + - `automatic`: Any reservations with an `affinity_policy` of `automatic` + that have the + same `profile` and `zone` as this bare metal server are available for + use. + :param List[ReservationIdentity] pool: (optional) The pool of reservations + available for use by this bare metal server, replacing the existing pool of + reservations. + Specified reservations must have a `status` of `active`, and have the same + `profile` and `zone` as this bare metal server. + If `policy` is `manual`, `pool` must have one reservation. If `policy` is + `disabled` or `automatic`, `pool` must be empty. If `policy` is `manual`, + the `pool` must contain a reservation with available capacity. + """ + self.policy = policy + self.pool = pool + + @classmethod + def from_dict(cls, _dict: Dict) -> 'BareMetalServerReservationAffinityPatch': + """Initialize a BareMetalServerReservationAffinityPatch object from a json dictionary.""" + args = {} + if (policy := _dict.get('policy')) is not None: + args['policy'] = policy + if (pool := _dict.get('pool')) is not None: + args['pool'] = pool + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a BareMetalServerReservationAffinityPatch 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, 'policy') and self.policy is not None: + _dict['policy'] = self.policy + if hasattr(self, 'pool') and self.pool is not None: + pool_list = [] + for v in self.pool: + if isinstance(v, dict): + pool_list.append(v) + else: + pool_list.append(v.to_dict()) + _dict['pool'] = pool_list + 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 BareMetalServerReservationAffinityPatch object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'BareMetalServerReservationAffinityPatch') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'BareMetalServerReservationAffinityPatch') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + class PolicyEnum(str, Enum): + """ + The reservation affinity policy to use for this bare metal server: + - `disabled`: Reservations will not be used + - `manual`: Reservations in `pool` will be available for use + - `automatic`: Any reservations with an `affinity_policy` of `automatic` that have + the + same `profile` and `zone` as this bare metal server are available for use. + """ + + AUTOMATIC = 'automatic' + DISABLED = 'disabled' + MANUAL = 'manual' + + + +class BareMetalServerReservationAffinityPrototype: + """ + BareMetalServerReservationAffinityPrototype. + + :param str policy: (optional) The reservation affinity policy to use for this + bare metal server: + - `disabled`: Reservations will not be used + - `manual`: Reservations in `pool` will be available for use + - `automatic`: Any reservations with an `affinity_policy` of `automatic` that + have the + same `profile` and `zone` as this bare metal server are available for use. + The policy will default to `manual` if `pool` is not empty. Otherwise the policy + will default to `automatic`. + :param List[ReservationIdentity] pool: (optional) The pool of reservations + available for use by this bare metal server. + Specified reservations must have a `status` of `active`, and have the same + `profile` and `zone` as this bare metal server. + If `policy` is `manual`, `pool` must have one reservation. If `policy` is + `disabled` or `automatic`, `pool` must be empty. If `policy` is `manual`, the + `pool` must contain a reservation with available capacity. + """ + + def __init__( + self, + *, + policy: Optional[str] = None, + pool: Optional[List['ReservationIdentity']] = None, + ) -> None: + """ + Initialize a BareMetalServerReservationAffinityPrototype object. + + :param str policy: (optional) The reservation affinity policy to use for + this bare metal server: + - `disabled`: Reservations will not be used + - `manual`: Reservations in `pool` will be available for use + - `automatic`: Any reservations with an `affinity_policy` of `automatic` + that have the + same `profile` and `zone` as this bare metal server are available for + use. + The policy will default to `manual` if `pool` is not empty. Otherwise the + policy will default to `automatic`. + :param List[ReservationIdentity] pool: (optional) The pool of reservations + available for use by this bare metal server. + Specified reservations must have a `status` of `active`, and have the same + `profile` and `zone` as this bare metal server. + If `policy` is `manual`, `pool` must have one reservation. If `policy` is + `disabled` or `automatic`, `pool` must be empty. If `policy` is `manual`, + the `pool` must contain a reservation with available capacity. + """ + self.policy = policy + self.pool = pool + + @classmethod + def from_dict(cls, _dict: Dict) -> 'BareMetalServerReservationAffinityPrototype': + """Initialize a BareMetalServerReservationAffinityPrototype object from a json dictionary.""" + args = {} + if (policy := _dict.get('policy')) is not None: + args['policy'] = policy + if (pool := _dict.get('pool')) is not None: + args['pool'] = pool + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a BareMetalServerReservationAffinityPrototype 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, 'policy') and self.policy is not None: + _dict['policy'] = self.policy + if hasattr(self, 'pool') and self.pool is not None: + pool_list = [] + for v in self.pool: + if isinstance(v, dict): + pool_list.append(v) + else: + pool_list.append(v.to_dict()) + _dict['pool'] = pool_list + 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 BareMetalServerReservationAffinityPrototype object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'BareMetalServerReservationAffinityPrototype') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'BareMetalServerReservationAffinityPrototype') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + class PolicyEnum(str, Enum): + """ + The reservation affinity policy to use for this bare metal server: + - `disabled`: Reservations will not be used + - `manual`: Reservations in `pool` will be available for use + - `automatic`: Any reservations with an `affinity_policy` of `automatic` that have + the + same `profile` and `zone` as this bare metal server are available for use. + The policy will default to `manual` if `pool` is not empty. Otherwise the policy + will default to `automatic`. + """ + + AUTOMATIC = 'automatic' + DISABLED = 'disabled' + MANUAL = 'manual' + + + class BareMetalServerStatusReason: """ BareMetalServerStatusReason. :param str code: The status reason code: + - `cannot_reinitialize`: An error occurred while reinitializing bare metal + server - `cannot_start`: Failed to start due to an internal error - `cannot_start_capacity`: Insufficient capacity within the selected zone - `cannot_start_compute`: An error occurred while allocating compute resources @@ -36430,6 +37347,12 @@ class BareMetalServerStatusReason: - `cannot_start_network`: An error occurred while allocating network resources - `cannot_update_firmware`: An error occurred while updating bare metal server firmware + - `cannot_start_reservation_capacity`: Failed to start because the reservation + has + insufficient capacity + - `cannot_start_reservation_expired`: Failed to start because the reservation + has + expired The enumerated values for this property may [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. @@ -36448,6 +37371,8 @@ def __init__( Initialize a BareMetalServerStatusReason object. :param str code: The status reason code: + - `cannot_reinitialize`: An error occurred while reinitializing bare metal + server - `cannot_start`: Failed to start due to an internal error - `cannot_start_capacity`: Insufficient capacity within the selected zone - `cannot_start_compute`: An error occurred while allocating compute @@ -36458,6 +37383,12 @@ def __init__( resources - `cannot_update_firmware`: An error occurred while updating bare metal server firmware + - `cannot_start_reservation_capacity`: Failed to start because the + reservation has + insufficient capacity + - `cannot_start_reservation_expired`: Failed to start because the + reservation has + expired The enumerated values for this property may [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. @@ -36522,6 +37453,7 @@ def __ne__(self, other: 'BareMetalServerStatusReason') -> bool: class CodeEnum(str, Enum): """ The status reason code: + - `cannot_reinitialize`: An error occurred while reinitializing bare metal server - `cannot_start`: Failed to start due to an internal error - `cannot_start_capacity`: Insufficient capacity within the selected zone - `cannot_start_compute`: An error occurred while allocating compute resources @@ -36529,6 +37461,10 @@ class CodeEnum(str, Enum): - `cannot_start_network`: An error occurred while allocating network resources - `cannot_update_firmware`: An error occurred while updating bare metal server firmware + - `cannot_start_reservation_capacity`: Failed to start because the reservation has + insufficient capacity + - `cannot_start_reservation_expired`: Failed to start because the reservation has + expired The enumerated values for this property may [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. @@ -36540,9 +37476,12 @@ class CodeEnum(str, Enum): CANNOT_START_COMPUTE = 'cannot_start_compute' CANNOT_START_IP_ADDRESS = 'cannot_start_ip_address' CANNOT_START_NETWORK = 'cannot_start_network' + CANNOT_START_RESERVATION_CAPACITY = 'cannot_start_reservation_capacity' + CANNOT_START_RESERVATION_EXPIRED = 'cannot_start_reservation_expired' CANNOT_UPDATE_FIRMWARE = 'cannot_update_firmware' + class BareMetalServerTrustedPlatformModule: """ BareMetalServerTrustedPlatformModule. @@ -36596,9 +37535,7 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerTrustedPlatformModule': 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 @@ -36648,6 +37585,7 @@ class ModeEnum(str, Enum): DISABLED = 'disabled' TPM_2 = 'tpm_2' + class SupportedModesEnum(str, Enum): """ The trusted platform module (TPM) mode: @@ -36662,6 +37600,7 @@ class SupportedModesEnum(str, Enum): TPM_2 = 'tpm_2' + class BareMetalServerTrustedPlatformModulePatch: """ BareMetalServerTrustedPlatformModulePatch. @@ -36738,6 +37677,7 @@ class ModeEnum(str, Enum): TPM_2 = 'tpm_2' + class BareMetalServerTrustedPlatformModulePrototype: """ BareMetalServerTrustedPlatformModulePrototype. @@ -36815,6 +37755,7 @@ class ModeEnum(str, Enum): TPM_2 = 'tpm_2' + class CatalogOfferingIdentity: """ Identifies a @@ -37110,12 +38051,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName', - 'CloudObjectStorageBucketIdentityByCRN', - ] - ) + ", ".join(['CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName', 'CloudObjectStorageBucketIdentityByCRN']) ) raise Exception(msg) @@ -37478,6 +38414,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -37486,6 +38423,7 @@ class ResourceTypeEnum(str, Enum): CLUSTER_NETWORK = 'cluster_network' + class ClusterNetworkCollection: """ ClusterNetworkCollection. @@ -37743,9 +38681,7 @@ def from_dict(cls, _dict: Dict) -> 'ClusterNetworkInterface': 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 ClusterNetworkInterface JSON' - ) + raise ValueError('Required property \'enable_infrastructure_nat\' not present in ClusterNetworkInterface JSON') if (href := _dict.get('href')) is not None: args['href'] = href else: @@ -37884,6 +38820,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -37892,6 +38829,7 @@ class ResourceTypeEnum(str, Enum): CLUSTER_NETWORK_INTERFACE = 'cluster_network_interface' + class ClusterNetworkInterfaceCollection: """ ClusterNetworkInterfaceCollection. @@ -38117,6 +39055,7 @@ class CodeEnum(str, Enum): RESOURCE_SUSPENDED_BY_PROVIDER = 'resource_suspended_by_provider' + class ClusterNetworkInterfacePatch: """ ClusterNetworkInterfacePatch. @@ -38207,12 +39146,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContext', - 'ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext', - ] - ) + ", ".join(['ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContext', 'ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext']) ) raise Exception(msg) @@ -38359,6 +39293,7 @@ class ResourceTypeEnum(str, Enum): CLUSTER_NETWORK_INTERFACE = 'cluster_network_interface' + class ClusterNetworkInterfaceTarget: """ The target of this cluster network interface. @@ -38376,9 +39311,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - ['ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext'] - ) + ", ".join(['ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext']) ) raise Exception(msg) @@ -38490,6 +39423,7 @@ class CodeEnum(str, Enum): RESOURCE_SUSPENDED_BY_PROVIDER = 'resource_suspended_by_provider' + class ClusterNetworkPatch: """ ClusterNetworkPatch. @@ -38622,13 +39556,9 @@ def from_dict(cls, _dict: Dict) -> 'ClusterNetworkProfile': else: raise ValueError('Required property \'resource_type\' not present in ClusterNetworkProfile 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 - ] + 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 ClusterNetworkProfile JSON' - ) + raise ValueError('Required property \'supported_instance_profiles\' not present in ClusterNetworkProfile JSON') if (zones := _dict.get('zones')) is not None: args['zones'] = [ZoneReference.from_dict(v) for v in zones] else: @@ -38697,6 +39627,7 @@ class FamilyEnum(str, Enum): VELA = 'vela' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -38705,6 +39636,7 @@ class ResourceTypeEnum(str, Enum): CLUSTER_NETWORK_PROFILE = 'cluster_network_profile' + class ClusterNetworkProfileCollection: """ ClusterNetworkProfileCollection. @@ -38927,6 +39859,7 @@ class ResourceTypeEnum(str, Enum): CLUSTER_NETWORK_PROFILE = 'cluster_network_profile' + class ClusterNetworkReference: """ ClusterNetworkReference. @@ -39051,6 +39984,7 @@ class ResourceTypeEnum(str, Enum): CLUSTER_NETWORK = 'cluster_network' + class ClusterNetworkSubnet: """ ClusterNetworkSubnet. @@ -39143,9 +40077,7 @@ def from_dict(cls, _dict: Dict) -> 'ClusterNetworkSubnet': 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 ClusterNetworkSubnet JSON' - ) + raise ValueError('Required property \'available_ipv4_address_count\' not present in ClusterNetworkSubnet JSON') if (created_at := _dict.get('created_at')) is not None: args['created_at'] = string_to_datetime(created_at) else: @@ -39254,6 +40186,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class LifecycleStateEnum(str, Enum): """ The lifecycle state of the cluster network subnet. @@ -39267,6 +40200,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -39275,6 +40209,7 @@ class ResourceTypeEnum(str, Enum): CLUSTER_NETWORK_SUBNET = 'cluster_network_subnet' + class ClusterNetworkSubnetCollection: """ ClusterNetworkSubnetCollection. @@ -39519,6 +40454,7 @@ class CodeEnum(str, Enum): RESOURCE_SUSPENDED_BY_PROVIDER = 'resource_suspended_by_provider' + class ClusterNetworkSubnetPatch: """ ClusterNetworkSubnetPatch. @@ -39665,6 +40601,7 @@ class AllocationPolicyEnum(str, Enum): AUTO = 'auto' + class ClusterNetworkSubnetPrefixPrototype: """ ClusterNetworkSubnetPrefixPrototype. @@ -39766,12 +40703,7 @@ def __init__( hyphenated list of randomly-selected words. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'ClusterNetworkSubnetPrototypeClusterNetworkSubnetByTotalCountPrototype', - 'ClusterNetworkSubnetPrototypeClusterNetworkSubnetByIPv4CIDRBlockPrototype', - ] - ) + ", ".join(['ClusterNetworkSubnetPrototypeClusterNetworkSubnetByTotalCountPrototype', 'ClusterNetworkSubnetPrototypeClusterNetworkSubnetByIPv4CIDRBlockPrototype']) ) raise Exception(msg) @@ -39783,6 +40715,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class ClusterNetworkSubnetReference: """ ClusterNetworkSubnetReference. @@ -39897,6 +40830,7 @@ class ResourceTypeEnum(str, Enum): CLUSTER_NETWORK_SUBNET = 'cluster_network_subnet' + class ClusterNetworkSubnetReservedIP: """ ClusterNetworkSubnetReservedIP. @@ -40014,13 +40948,9 @@ def from_dict(cls, _dict: Dict) -> 'ClusterNetworkSubnetReservedIP': else: raise ValueError('Required property \'id\' not present in ClusterNetworkSubnetReservedIP JSON') if (lifecycle_reasons := _dict.get('lifecycle_reasons')) is not None: - args['lifecycle_reasons'] = [ - ClusterNetworkSubnetReservedIPLifecycleReason.from_dict(v) for v in lifecycle_reasons - ] + args['lifecycle_reasons'] = [ClusterNetworkSubnetReservedIPLifecycleReason.from_dict(v) for v in lifecycle_reasons] else: - raise ValueError( - 'Required property \'lifecycle_reasons\' not present in ClusterNetworkSubnetReservedIP JSON' - ) + raise ValueError('Required property \'lifecycle_reasons\' not present in ClusterNetworkSubnetReservedIP JSON') if (lifecycle_state := _dict.get('lifecycle_state')) is not None: args['lifecycle_state'] = lifecycle_state else: @@ -40113,6 +41043,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class OwnerEnum(str, Enum): """ The owner of the cluster network subnet reserved IP @@ -40124,6 +41055,7 @@ class OwnerEnum(str, Enum): PROVIDER = 'provider' USER = 'user' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -40132,6 +41064,7 @@ class ResourceTypeEnum(str, Enum): CLUSTER_NETWORK_SUBNET_RESERVED_IP = 'cluster_network_subnet_reserved_ip' + class ClusterNetworkSubnetReservedIPCollection: """ ClusterNetworkSubnetReservedIPCollection. @@ -40192,15 +41125,11 @@ def from_dict(cls, _dict: Dict) -> 'ClusterNetworkSubnetReservedIPCollection': if (reserved_ips := _dict.get('reserved_ips')) is not None: args['reserved_ips'] = [ClusterNetworkSubnetReservedIP.from_dict(v) for v in reserved_ips] else: - raise ValueError( - 'Required property \'reserved_ips\' not present in ClusterNetworkSubnetReservedIPCollection JSON' - ) + raise ValueError('Required property \'reserved_ips\' not present in ClusterNetworkSubnetReservedIPCollection 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 ClusterNetworkSubnetReservedIPCollection JSON' - ) + raise ValueError('Required property \'total_count\' not present in ClusterNetworkSubnetReservedIPCollection JSON') return cls(**args) @classmethod @@ -40303,15 +41232,11 @@ def from_dict(cls, _dict: Dict) -> 'ClusterNetworkSubnetReservedIPLifecycleReaso if (code := _dict.get('code')) is not None: args['code'] = code else: - raise ValueError( - 'Required property \'code\' not present in ClusterNetworkSubnetReservedIPLifecycleReason JSON' - ) + raise ValueError('Required property \'code\' not present in ClusterNetworkSubnetReservedIPLifecycleReason JSON') if (message := _dict.get('message')) is not None: args['message'] = message else: - raise ValueError( - 'Required property \'message\' not present in ClusterNetworkSubnetReservedIPLifecycleReason JSON' - ) + raise ValueError('Required property \'message\' not present in ClusterNetworkSubnetReservedIPLifecycleReason JSON') if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info return cls(**args) @@ -40365,6 +41290,7 @@ class CodeEnum(str, Enum): RESOURCE_SUSPENDED_BY_PROVIDER = 'resource_suspended_by_provider' + class ClusterNetworkSubnetReservedIPPatch: """ ClusterNetworkSubnetReservedIPPatch. @@ -40505,9 +41431,7 @@ def from_dict(cls, _dict: Dict) -> 'ClusterNetworkSubnetReservedIPReference': if (address := _dict.get('address')) is not None: args['address'] = address else: - raise ValueError( - 'Required property \'address\' not present in ClusterNetworkSubnetReservedIPReference JSON' - ) + raise ValueError('Required property \'address\' not present in ClusterNetworkSubnetReservedIPReference JSON') if (deleted := _dict.get('deleted')) is not None: args['deleted'] = Deleted.from_dict(deleted) if (href := _dict.get('href')) is not None: @@ -40525,9 +41449,7 @@ def from_dict(cls, _dict: Dict) -> 'ClusterNetworkSubnetReservedIPReference': 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 ClusterNetworkSubnetReservedIPReference JSON' - ) + raise ValueError('Required property \'resource_type\' not present in ClusterNetworkSubnetReservedIPReference JSON') return cls(**args) @classmethod @@ -40581,6 +41503,7 @@ class ResourceTypeEnum(str, Enum): CLUSTER_NETWORK_SUBNET_RESERVED_IP = 'cluster_network_subnet_reserved_ip' + class ClusterNetworkSubnetReservedIPTarget: """ The target this cluster network subnet reserved IP is bound to. @@ -40596,11 +41519,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext' - ] - ) + ", ".join(['ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext']) ) raise Exception(msg) @@ -41130,9 +42049,7 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHost': 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 - ] + 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: @@ -41271,6 +42188,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -41278,6 +42196,7 @@ class ResourceTypeEnum(str, Enum): DEDICATED_HOST = 'dedicated_host' + class StateEnum(str, Enum): """ The administrative state of the dedicated host. @@ -41292,6 +42211,7 @@ class StateEnum(str, Enum): UNAVAILABLE = 'unavailable' + class DedicatedHostCollection: """ DedicatedHostCollection. @@ -41538,9 +42458,7 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostDisk': 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 @@ -41608,6 +42526,7 @@ class InterfaceTypeEnum(str, Enum): NVME = 'nvme' + class LifecycleStateEnum(str, Enum): """ The lifecycle state of this dedicated host disk. @@ -41621,6 +42540,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -41628,6 +42548,7 @@ class ResourceTypeEnum(str, Enum): DEDICATED_HOST_DISK = 'dedicated_host_disk' + class SupportedInstanceInterfaceTypesEnum(str, Enum): """ The disk interface used for attaching the disk. @@ -41640,6 +42561,7 @@ class SupportedInstanceInterfaceTypesEnum(str, Enum): VIRTIO_BLK = 'virtio_blk' + class DedicatedHostDiskCollection: """ DedicatedHostDiskCollection. @@ -41884,9 +42806,7 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostGroup': 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 - ] + 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: @@ -41974,6 +42894,7 @@ class FamilyEnum(str, Enum): COMPUTE = 'compute' MEMORY = 'memory' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -41982,6 +42903,7 @@ class ResourceTypeEnum(str, Enum): DEDICATED_HOST_GROUP = 'dedicated_host_group' + class DedicatedHostGroupCollection: """ DedicatedHostGroupCollection. @@ -42112,13 +43034,7 @@ def __init__( """ 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) @@ -42382,6 +43298,7 @@ class ResourceTypeEnum(str, Enum): DEDICATED_HOST_GROUP = 'dedicated_host_group' + class DedicatedHostNUMA: """ The dedicated host NUMA configuration. @@ -42733,13 +43650,9 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostProfile': 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 - ] + 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 \'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) else: @@ -42845,6 +43758,7 @@ class FamilyEnum(str, Enum): COMPUTE = 'compute' MEMORY = 'memory' + class StatusEnum(str, Enum): """ The status of the dedicated host profile: @@ -42865,6 +43779,7 @@ class StatusEnum(str, Enum): PREVIOUS = 'previous' + class DedicatedHostProfileCollection: """ DedicatedHostProfileCollection. @@ -43035,13 +43950,9 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostProfileDisk': 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 - ) + 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 \'supported_instance_interface_types\' not present in DedicatedHostProfileDisk JSON') return cls(**args) @classmethod @@ -43176,6 +44087,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class ValueEnum(str, Enum): """ The interface of the disk for a dedicated host with this profile @@ -43187,6 +44099,7 @@ class ValueEnum(str, Enum): NVME = 'nvme' + class DedicatedHostProfileDiskQuantity: """ The number of disks of this type for a dedicated host with this profile. @@ -43263,6 +44176,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class DedicatedHostProfileDiskSize: """ The size of the disk in GB (gigabytes). @@ -43339,6 +44253,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class DedicatedHostProfileDiskSupportedInterfaces: """ DedicatedHostProfileDiskSupportedInterfaces. @@ -43370,15 +44285,11 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostProfileDiskSupportedInterfaces' 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 @@ -43420,6 +44331,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class ValueEnum(str, Enum): """ The disk interface used for attaching the disk. @@ -43432,6 +44344,7 @@ class ValueEnum(str, Enum): VIRTIO_BLK = 'virtio_blk' + class DedicatedHostProfileIdentity: """ Identifies a dedicated host profile by a unique property. @@ -43465,14 +44378,7 @@ def __init__( """ 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) @@ -43560,14 +44466,7 @@ def __init__( """ 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) @@ -43586,14 +44485,7 @@ def __init__( """ 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) @@ -43675,6 +44567,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class DedicatedHostProfileVCPUManufacturer: """ DedicatedHostProfileVCPUManufacturer. @@ -43752,6 +44645,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class DedicatedHostPrototype: """ DedicatedHostPrototype. @@ -43925,6 +44819,7 @@ class ResourceTypeEnum(str, Enum): DEDICATED_HOST = 'dedicated_host' + class DefaultNetworkACL: """ DefaultNetworkACL. @@ -44344,9 +45239,7 @@ def from_dict(cls, _dict: Dict) -> 'DefaultRoutingTable': 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' - ) + 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: @@ -44454,6 +45347,7 @@ class AdvertiseRoutesToEnum(str, Enum): DIRECT_LINK = 'direct_link' TRANSIT_GATEWAY = 'transit_gateway' + class LifecycleStateEnum(str, Enum): """ The lifecycle state of the routing table. @@ -44467,6 +45361,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -44475,6 +45370,7 @@ class ResourceTypeEnum(str, Enum): ROUTING_TABLE = 'routing_table' + class DefaultSecurityGroup: """ DefaultSecurityGroup. @@ -44831,9 +45727,9 @@ class EndpointGateway: :param List[SecurityGroupReference] security_groups: The security groups targeting this endpoint gateway. :param str service_endpoint: (optional) Deprecated: The fully qualified domain - name for the target service. + name for the target service. The domain name may have a wildcard prefix. :param List[str] service_endpoints: The fully qualified domain names for the - target service. + target service. A domain name may have a wildcard prefix. :param EndpointGatewayTarget target: The target for this endpoint gateway. :param VPCReference vpc: The VPC this endpoint gateway resides in. """ @@ -44896,11 +45792,12 @@ def __init__( :param List[SecurityGroupReference] security_groups: The security groups targeting this endpoint gateway. :param List[str] service_endpoints: The fully qualified domain names for - the target service. + the target service. A domain name may have a wildcard prefix. :param EndpointGatewayTarget target: The target for this endpoint gateway. :param VPCReference vpc: The VPC this endpoint gateway resides in. :param str service_endpoint: (optional) Deprecated: The fully qualified - domain name for the target service. + domain name for the target service. The domain name may have a wildcard + prefix. """ self.allow_dns_resolution_binding = allow_dns_resolution_binding self.created_at = created_at @@ -45098,6 +45995,7 @@ class HealthStateEnum(str, Enum): INAPPLICABLE = 'inapplicable' OK = 'ok' + class LifecycleStateEnum(str, Enum): """ The lifecycle state of the endpoint gateway. @@ -45111,6 +46009,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -45119,6 +46018,7 @@ class ResourceTypeEnum(str, Enum): ENDPOINT_GATEWAY = 'endpoint_gateway' + class EndpointGatewayCollection: """ EndpointGatewayCollection. @@ -45360,6 +46260,7 @@ class CodeEnum(str, Enum): RESOURCE_SUSPENDED_BY_PROVIDER = 'resource_suspended_by_provider' + class EndpointGatewayPatch: """ EndpointGatewayPatch. @@ -45564,6 +46465,7 @@ class ResourceTypeEnum(str, Enum): ENDPOINT_GATEWAY = 'endpoint_gateway' + class EndpointGatewayRemote: """ If present, this property indicates that the resource associated with this reference @@ -45662,12 +46564,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'EndpointGatewayReservedIPReservedIPIdentity', - 'EndpointGatewayReservedIPReservedIPPrototypeTargetContext', - ] - ) + ", ".join(['EndpointGatewayReservedIPReservedIPIdentity', 'EndpointGatewayReservedIPReservedIPPrototypeTargetContext']) ) raise Exception(msg) @@ -45690,13 +46587,7 @@ def __init__( gateway. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'EndpointGatewayTargetPrivatePathServiceGatewayReference', - 'EndpointGatewayTargetProviderCloudServiceReference', - 'EndpointGatewayTargetProviderInfrastructureServiceReference', - ] - ) + ", ".join(['EndpointGatewayTargetPrivatePathServiceGatewayReference', 'EndpointGatewayTargetProviderCloudServiceReference', 'EndpointGatewayTargetProviderInfrastructureServiceReference']) ) raise Exception(msg) @@ -45710,6 +46601,7 @@ class ResourceTypeEnum(str, Enum): PROVIDER_INFRASTRUCTURE_SERVICE = 'provider_infrastructure_service' + class EndpointGatewayTargetPrototype: """ The target to use for this endpoint gateway. The target: @@ -45734,13 +46626,7 @@ def __init__( endpoint gateway. """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype', - 'EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype', - 'EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype', - ] - ) + ", ".join(['EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype', 'EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype', 'EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype']) ) raise Exception(msg) @@ -45754,6 +46640,7 @@ class ResourceTypeEnum(str, Enum): PROVIDER_INFRASTRUCTURE_SERVICE = 'provider_infrastructure_service' + class FloatingIP: """ FloatingIP. @@ -45935,6 +46822,7 @@ class StatusEnum(str, Enum): PENDING = 'pending' + class FloatingIPCollection: """ FloatingIPCollection. @@ -46101,29 +46989,21 @@ def from_dict(cls, _dict: Dict) -> 'FloatingIPCollectionVirtualNetworkInterfaceC if (first := _dict.get('first')) is not None: args['first'] = PageLink.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] 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'] = PageLink.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 @@ -46438,14 +47318,7 @@ def __init__( """ 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) @@ -46471,13 +47344,7 @@ def __init__( """ 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) @@ -46501,13 +47368,7 @@ def __init__( """ 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) @@ -46837,6 +47698,7 @@ class LifecycleStateEnum(str, Enum): WAITING = 'waiting' + class FlowLogCollectorCollection: """ FlowLogCollectorCollection. @@ -47058,16 +47920,7 @@ def __init__( """ 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) @@ -47092,16 +47945,7 @@ def __init__( """ 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) @@ -47339,6 +48183,7 @@ class AuthenticationAlgorithmEnum(str, Enum): SHA384 = 'sha384' SHA512 = 'sha512' + class EncryptionAlgorithmEnum(str, Enum): """ The encryption algorithm. @@ -47353,6 +48198,7 @@ class EncryptionAlgorithmEnum(str, Enum): AES256 = 'aes256' TRIPLE_DES = 'triple_des' + class NegotiationModeEnum(str, Enum): """ The IKE negotiation mode. @@ -47363,6 +48209,7 @@ class NegotiationModeEnum(str, Enum): MAIN = 'main' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -47371,6 +48218,7 @@ class ResourceTypeEnum(str, Enum): IKE_POLICY = 'ike_policy' + class IKEPolicyCollection: """ IKEPolicyCollection. @@ -47714,6 +48562,7 @@ class AuthenticationAlgorithmEnum(str, Enum): SHA384 = 'sha384' SHA512 = 'sha512' + class EncryptionAlgorithmEnum(str, Enum): """ The encryption algorithm. @@ -47724,6 +48573,7 @@ class EncryptionAlgorithmEnum(str, Enum): AES256 = 'aes256' + class IKEPolicyReference: """ IKEPolicyReference. @@ -47838,6 +48688,7 @@ class ResourceTypeEnum(str, Enum): IKE_POLICY = 'ike_policy' + class IP: """ IP. @@ -48150,6 +49001,7 @@ class AuthenticationAlgorithmEnum(str, Enum): SHA384 = 'sha384' SHA512 = 'sha512' + class EncapsulationModeEnum(str, Enum): """ The encapsulation mode used. @@ -48160,6 +49012,7 @@ class EncapsulationModeEnum(str, Enum): TUNNEL = 'tunnel' + class EncryptionAlgorithmEnum(str, Enum): """ The encryption algorithm @@ -48177,6 +49030,7 @@ class EncryptionAlgorithmEnum(str, Enum): AES256GCM16 = 'aes256gcm16' TRIPLE_DES = 'triple_des' + class PfsEnum(str, Enum): """ The Perfect Forward Secrecy group @@ -48202,6 +49056,7 @@ class PfsEnum(str, Enum): GROUP_31 = 'group_31' GROUP_5 = 'group_5' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -48209,6 +49064,7 @@ class ResourceTypeEnum(str, Enum): IPSEC_POLICY = 'ipsec_policy' + class TransformProtocolEnum(str, Enum): """ The transform protocol used. @@ -48220,6 +49076,7 @@ class TransformProtocolEnum(str, Enum): ESP = 'esp' + class IPsecPolicyCollection: """ IPsecPolicyCollection. @@ -48575,6 +49432,7 @@ class AuthenticationAlgorithmEnum(str, Enum): SHA384 = 'sha384' SHA512 = 'sha512' + class EncryptionAlgorithmEnum(str, Enum): """ The encryption algorithm @@ -48590,6 +49448,7 @@ class EncryptionAlgorithmEnum(str, Enum): AES256 = 'aes256' AES256GCM16 = 'aes256gcm16' + class PfsEnum(str, Enum): """ The Perfect Forward Secrecy group. @@ -48611,6 +49470,7 @@ class PfsEnum(str, Enum): GROUP_31 = 'group_31' + class IPsecPolicyReference: """ IPsecPolicyReference. @@ -48725,6 +49585,7 @@ class ResourceTypeEnum(str, Enum): IPSEC_POLICY = 'ipsec_policy' + class Image: """ Image. @@ -49074,6 +49935,7 @@ class EncryptionEnum(str, Enum): NONE = 'none' USER_MANAGED = 'user_managed' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -49081,6 +49943,7 @@ class ResourceTypeEnum(str, Enum): IMAGE = 'image' + class StatusEnum(str, Enum): """ The status of this image: @@ -49105,6 +49968,7 @@ class StatusEnum(str, Enum): PENDING = 'pending' UNUSABLE = 'unusable' + class UserDataFormatEnum(str, Enum): """ The user data format for this image: @@ -49122,6 +49986,7 @@ class UserDataFormatEnum(str, Enum): ESXI_KICKSTART = 'esxi_kickstart' IPXE = 'ipxe' + class VisibilityEnum(str, Enum): """ The visibility of this image. @@ -49133,6 +49998,7 @@ class VisibilityEnum(str, Enum): PUBLIC = 'public' + class ImageCatalogOffering: """ ImageCatalogOffering. @@ -49603,6 +50469,7 @@ class FormatEnum(str, Enum): QCOW2 = 'qcow2' VHD = 'vhd' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -49610,6 +50477,7 @@ class ResourceTypeEnum(str, Enum): IMAGE_EXPORT_JOB = 'image_export_job' + class StatusEnum(str, Enum): """ The status of this image export job: @@ -49631,6 +50499,7 @@ class StatusEnum(str, Enum): SUCCEEDED = 'succeeded' + class ImageExportJobPatch: """ ImageExportJobPatch. @@ -49792,6 +50661,7 @@ class CodeEnum(str, Enum): INTERNAL_ERROR = 'internal_error' + class ImageExportJobUnpaginatedCollection: """ ImageExportJobUnpaginatedCollection. @@ -49817,9 +50687,7 @@ def from_dict(cls, _dict: Dict) -> 'ImageExportJobUnpaginatedCollection': if (export_jobs := _dict.get('export_jobs')) is not None: 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 @@ -50437,6 +51305,7 @@ class ResourceTypeEnum(str, Enum): IMAGE = 'image' + class ImageRemote: """ If present, this property indicates that the resource associated with this reference @@ -50666,6 +51535,7 @@ class CodeEnum(str, Enum): IMAGE_REQUEST_QUEUED = 'image_request_queued' + class Instance: """ Instance. @@ -51018,9 +51888,7 @@ def from_dict(cls, _dict: Dict) -> 'Instance': if (cluster_network := _dict.get('cluster_network')) is not None: args['cluster_network'] = ClusterNetworkReference.from_dict(cluster_network) if (cluster_network_attachments := _dict.get('cluster_network_attachments')) is not None: - args['cluster_network_attachments'] = [ - InstanceClusterNetworkAttachmentReference.from_dict(v) for v in cluster_network_attachments - ] + args['cluster_network_attachments'] = [InstanceClusterNetworkAttachmentReference.from_dict(v) for v in cluster_network_attachments] else: raise ValueError('Required property \'cluster_network_attachments\' not present in Instance JSON') if (confidential_compute_mode := _dict.get('confidential_compute_mode')) is not None: @@ -51090,9 +51958,7 @@ def from_dict(cls, _dict: Dict) -> 'Instance': 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') if (numa_count := _dict.get('numa_count')) is not None: @@ -51100,13 +51966,9 @@ def from_dict(cls, _dict: Dict) -> 'Instance': 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 - ) + 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 - ) + 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: @@ -51152,9 +52014,7 @@ def from_dict(cls, _dict: Dict) -> 'Instance': else: 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') if (vpc := _dict.get('vpc')) is not None: @@ -51391,6 +52251,7 @@ class ConfidentialComputeModeEnum(str, Enum): DISABLED = 'disabled' SGX = 'sgx' + class HealthStateEnum(str, Enum): """ The health of this resource: @@ -51408,6 +52269,7 @@ class HealthStateEnum(str, Enum): INAPPLICABLE = 'inapplicable' OK = 'ok' + class LifecycleStateEnum(str, Enum): """ The lifecycle state of the virtual server instance. @@ -51421,6 +52283,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -51428,6 +52291,7 @@ class ResourceTypeEnum(str, Enum): INSTANCE = 'instance' + class StatusEnum(str, Enum): """ The status of the virtual server instance. @@ -51446,6 +52310,7 @@ class StatusEnum(str, Enum): STOPPING = 'stopping' + class InstanceAction: """ InstanceAction. @@ -51585,6 +52450,7 @@ class StatusEnum(str, Enum): PENDING = 'pending' RUNNING = 'running' + class TypeEnum(str, Enum): """ The type of action. @@ -51595,6 +52461,7 @@ class TypeEnum(str, Enum): STOP = 'stop' + class InstanceAvailabilityPolicy: """ InstanceAvailabilityPolicy. @@ -51681,6 +52548,7 @@ class HostFailureEnum(str, Enum): STOP = 'stop' + class InstanceAvailabilityPolicyPatch: """ InstanceAvailabilityPolicyPatch. @@ -51757,6 +52625,7 @@ class HostFailureEnum(str, Enum): STOP = 'stop' + class InstanceAvailabilityPolicyPrototype: """ InstanceAvailabilityPolicyPrototype. @@ -51833,6 +52702,7 @@ class HostFailureEnum(str, Enum): STOP = 'stop' + class InstanceCatalogOffering: """ InstanceCatalogOffering. @@ -51957,12 +52827,7 @@ def __init__( 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) @@ -52038,9 +52903,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceClusterNetworkAttachment': if (cluster_network_interface := _dict.get('cluster_network_interface')) is not None: args['cluster_network_interface'] = ClusterNetworkInterfaceReference.from_dict(cluster_network_interface) else: - raise ValueError( - 'Required property \'cluster_network_interface\' not present in InstanceClusterNetworkAttachment JSON' - ) + raise ValueError('Required property \'cluster_network_interface\' not present in InstanceClusterNetworkAttachment JSON') if (href := _dict.get('href')) is not None: args['href'] = href else: @@ -52050,19 +52913,13 @@ def from_dict(cls, _dict: Dict) -> 'InstanceClusterNetworkAttachment': else: raise ValueError('Required property \'id\' not present in InstanceClusterNetworkAttachment JSON') if (lifecycle_reasons := _dict.get('lifecycle_reasons')) is not None: - args['lifecycle_reasons'] = [ - InstanceClusterNetworkAttachmentLifecycleReason.from_dict(v) for v in lifecycle_reasons - ] + args['lifecycle_reasons'] = [InstanceClusterNetworkAttachmentLifecycleReason.from_dict(v) for v in lifecycle_reasons] else: - raise ValueError( - 'Required property \'lifecycle_reasons\' not present in InstanceClusterNetworkAttachment JSON' - ) + raise ValueError('Required property \'lifecycle_reasons\' not present in InstanceClusterNetworkAttachment 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 InstanceClusterNetworkAttachment JSON' - ) + raise ValueError('Required property \'lifecycle_state\' not present in InstanceClusterNetworkAttachment JSON') if (name := _dict.get('name')) is not None: args['name'] = name else: @@ -52142,6 +52999,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -52150,6 +53008,7 @@ class ResourceTypeEnum(str, Enum): INSTANCE_CLUSTER_NETWORK_ATTACHMENT = 'instance_cluster_network_attachment' + class InstanceClusterNetworkAttachmentBefore: """ The instance cluster network attachment that is immediately before. If absent, this is @@ -52204,9 +53063,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceClusterNetworkAttachmentBefore': 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 InstanceClusterNetworkAttachmentBefore JSON' - ) + raise ValueError('Required property \'resource_type\' not present in InstanceClusterNetworkAttachmentBefore JSON') return cls(**args) @classmethod @@ -52253,6 +53110,7 @@ class ResourceTypeEnum(str, Enum): INSTANCE_CLUSTER_NETWORK_ATTACHMENT = 'instance_cluster_network_attachment' + class InstanceClusterNetworkAttachmentBeforePrototype: """ The instance cluster network attachment to insert this instance cluster network @@ -52270,12 +53128,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById', - 'InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref', - ] - ) + ", ".join(['InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById', 'InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref']) ) raise Exception(msg) @@ -52332,33 +53185,23 @@ def from_dict(cls, _dict: Dict) -> 'InstanceClusterNetworkAttachmentCollection': """Initialize a InstanceClusterNetworkAttachmentCollection object from a json dictionary.""" args = {} if (cluster_network_attachments := _dict.get('cluster_network_attachments')) is not None: - args['cluster_network_attachments'] = [ - InstanceClusterNetworkAttachment.from_dict(v) for v in cluster_network_attachments - ] + args['cluster_network_attachments'] = [InstanceClusterNetworkAttachment.from_dict(v) for v in cluster_network_attachments] else: - raise ValueError( - 'Required property \'cluster_network_attachments\' not present in InstanceClusterNetworkAttachmentCollection JSON' - ) + raise ValueError('Required property \'cluster_network_attachments\' not present in InstanceClusterNetworkAttachmentCollection JSON') if (first := _dict.get('first')) is not None: args['first'] = PageLink.from_dict(first) else: - raise ValueError( - 'Required property \'first\' not present in InstanceClusterNetworkAttachmentCollection JSON' - ) + raise ValueError('Required property \'first\' not present in InstanceClusterNetworkAttachmentCollection JSON') if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError( - 'Required property \'limit\' not present in InstanceClusterNetworkAttachmentCollection JSON' - ) + raise ValueError('Required property \'limit\' not present in InstanceClusterNetworkAttachmentCollection JSON') if (next := _dict.get('next')) is not None: args['next'] = PageLink.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 InstanceClusterNetworkAttachmentCollection JSON' - ) + raise ValueError('Required property \'total_count\' not present in InstanceClusterNetworkAttachmentCollection JSON') return cls(**args) @classmethod @@ -52461,15 +53304,11 @@ def from_dict(cls, _dict: Dict) -> 'InstanceClusterNetworkAttachmentLifecycleRea if (code := _dict.get('code')) is not None: args['code'] = code else: - raise ValueError( - 'Required property \'code\' not present in InstanceClusterNetworkAttachmentLifecycleReason JSON' - ) + raise ValueError('Required property \'code\' not present in InstanceClusterNetworkAttachmentLifecycleReason JSON') if (message := _dict.get('message')) is not None: args['message'] = message else: - raise ValueError( - 'Required property \'message\' not present in InstanceClusterNetworkAttachmentLifecycleReason JSON' - ) + raise ValueError('Required property \'message\' not present in InstanceClusterNetworkAttachmentLifecycleReason JSON') if (more_info := _dict.get('more_info')) is not None: args['more_info'] = more_info return cls(**args) @@ -52523,6 +53362,7 @@ class CodeEnum(str, Enum): RESOURCE_SUSPENDED_BY_PROVIDER = 'resource_suspended_by_provider' + class InstanceClusterNetworkAttachmentPatch: """ InstanceClusterNetworkAttachmentPatch. @@ -52606,12 +53446,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment', - 'InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentity', - ] - ) + ", ".join(['InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment', 'InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentity']) ) raise Exception(msg) @@ -52674,9 +53509,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceClusterNetworkAttachmentPrototypeIns if (cluster_network_interface := _dict.get('cluster_network_interface')) is not None: args['cluster_network_interface'] = cluster_network_interface else: - raise ValueError( - 'Required property \'cluster_network_interface\' not present in InstanceClusterNetworkAttachmentPrototypeInstanceContext JSON' - ) + raise ValueError('Required property \'cluster_network_interface\' not present in InstanceClusterNetworkAttachmentPrototypeInstanceContext JSON') if (name := _dict.get('name')) is not None: args['name'] = name return cls(**args) @@ -52770,9 +53603,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceClusterNetworkAttachmentReference': 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 InstanceClusterNetworkAttachmentReference JSON' - ) + raise ValueError('Required property \'resource_type\' not present in InstanceClusterNetworkAttachmentReference JSON') return cls(**args) @classmethod @@ -52819,6 +53650,7 @@ class ResourceTypeEnum(str, Enum): INSTANCE_CLUSTER_NETWORK_ATTACHMENT = 'instance_cluster_network_attachment' + class InstanceCollection: """ InstanceCollection. @@ -53062,6 +53894,7 @@ class ConsoleTypeEnum(str, Enum): VNC = 'vnc' + class InstanceDefaultTrustedProfilePrototype: """ InstanceDefaultTrustedProfilePrototype. @@ -53279,6 +54112,7 @@ class InterfaceTypeEnum(str, Enum): NVME = 'nvme' VIRTIO_BLK = 'virtio_blk' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -53287,6 +54121,7 @@ class ResourceTypeEnum(str, Enum): INSTANCE_DISK = 'instance_disk' + class InstanceDiskCollection: """ InstanceDiskCollection. @@ -53526,6 +54361,7 @@ class ResourceTypeEnum(str, Enum): INSTANCE_DISK = 'instance_disk' + class InstanceGPU: """ The virtual server instance GPU configuration. @@ -53912,6 +54748,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class StatusEnum(str, Enum): """ The status of the instance group @@ -53931,6 +54768,7 @@ class StatusEnum(str, Enum): UNHEALTHY = 'unhealthy' + class InstanceGroupCollection: """ InstanceGroupCollection. @@ -54154,6 +54992,7 @@ class CodeEnum(str, Enum): RESOURCE_SUSPENDED_BY_PROVIDER = 'resource_suspended_by_provider' + class InstanceGroupManager: """ InstanceGroupManager. @@ -54285,6 +55124,7 @@ class ResourceTypeEnum(str, Enum): INSTANCE_GROUP_MANAGER_ACTION = 'instance_group_manager_action' + class StatusEnum(str, Enum): """ The status of the instance group action @@ -54305,6 +55145,7 @@ class StatusEnum(str, Enum): OMITTED = 'omitted' + class InstanceGroupManagerActionGroupPatch: """ InstanceGroupManagerActionGroupPatch. @@ -54656,9 +55497,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerActionReference': 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 @@ -54710,6 +55549,7 @@ class ResourceTypeEnum(str, Enum): INSTANCE_GROUP_MANAGER_ACTION = 'instance_group_manager_action' + class InstanceGroupManagerActionsCollection: """ InstanceGroupManagerActionsCollection. @@ -54774,9 +55614,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerActionsCollection': 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 @@ -55163,9 +56001,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerPolicyCollection': 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 @@ -55306,6 +56142,7 @@ class MetricTypeEnum(str, Enum): NETWORK_OUT = 'network_out' + class InstanceGroupManagerPolicyPrototype: """ InstanceGroupManagerPolicyPrototype. @@ -55459,12 +56296,7 @@ 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) @@ -55593,9 +56425,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerScheduledActionGroup': 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 @@ -55656,9 +56486,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerScheduledActionGroupProt 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 @@ -55820,9 +56648,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupMembership': 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: @@ -55865,10 +56691,7 @@ 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 - ): + 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 @@ -55935,6 +56758,7 @@ class StatusEnum(str, Enum): UNHEALTHY = 'unhealthy' + class InstanceGroupMembershipCollection: """ InstanceGroupMembershipCollection. @@ -56099,10 +56923,7 @@ def _from_dict(cls, _dict): def to_dict(self) -> Dict: """Return a json dictionary representing this model.""" _dict = {} - if ( - hasattr(self, 'delete_instance_on_membership_delete') - and self.delete_instance_on_membership_delete is not None - ): + 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, 'name') and self.name is not None: _dict['name'] = self.name @@ -56402,7 +57223,9 @@ class InstanceHealthReason: - `reservation_expired`: The reservation affinity pool has an expired reservation. - `reservation_failed`: The reservation affinity pool has a failed reservation. - The enumerated values for this property may + See [health status + reasons](https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons) + for details. 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 health state. @@ -56429,7 +57252,9 @@ def __init__( reservation. - `reservation_failed`: The reservation affinity pool has a failed reservation. - The enumerated values for this property may + See [health status + reasons](https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons) + for details. 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 health state. @@ -56498,7 +57323,9 @@ class CodeEnum(str, Enum): - `reservation_deleted`: The reservation affinity pool has a deleted reservation. - `reservation_expired`: The reservation affinity pool has an expired reservation. - `reservation_failed`: The reservation affinity pool has a failed reservation. - The enumerated values for this property may + See [health status + reasons](https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons) + for details. The enumerated values for this property may [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. """ @@ -56509,6 +57336,7 @@ class CodeEnum(str, Enum): RESERVATION_FAILED = 'reservation_failed' + class InstanceInitialization: """ InstanceInitialization. @@ -56549,9 +57377,7 @@ 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 - ) + 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: @@ -56644,15 +57470,11 @@ def from_dict(cls, _dict: Dict) -> 'InstanceInitializationDefaultTrustedProfile' 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 @@ -56725,9 +57547,7 @@ 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) else: @@ -56897,6 +57717,7 @@ class CodeEnum(str, Enum): RESOURCE_SUSPENDED_BY_PROVIDER = 'resource_suspended_by_provider' + class InstanceMetadataService: """ The metadata service configuration. @@ -56999,6 +57820,7 @@ class ProtocolEnum(str, Enum): HTTPS = 'https' + class InstanceMetadataServicePatch: """ The metadata service configuration. @@ -57097,6 +57919,7 @@ class ProtocolEnum(str, Enum): HTTPS = 'https' + class InstanceMetadataServicePrototype: """ The metadata service configuration. @@ -57195,6 +58018,7 @@ class ProtocolEnum(str, Enum): HTTPS = 'https' + class InstanceNetworkAttachment: """ InstanceNetworkAttachment. @@ -57316,13 +58140,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceNetworkAttachment': 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 - ) + 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 \'virtual_network_interface\' not present in InstanceNetworkAttachment JSON') return cls(**args) @classmethod @@ -57397,6 +58217,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -57404,6 +58225,7 @@ class ResourceTypeEnum(str, Enum): INSTANCE_NETWORK_ATTACHMENT = 'instance_network_attachment' + class TypeEnum(str, Enum): """ The instance network attachment type. @@ -57413,6 +58235,7 @@ class TypeEnum(str, Enum): SECONDARY = 'secondary' + class InstanceNetworkAttachmentCollection: """ InstanceNetworkAttachmentCollection. @@ -57440,9 +58263,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceNetworkAttachmentCollection': 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 @@ -57594,9 +58415,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceNetworkAttachmentPrototype': 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 @@ -57654,12 +58473,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext', - 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity', - ] - ) + ", ".join(['InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext', 'InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity']) ) raise Exception(msg) @@ -57752,21 +58566,15 @@ def from_dict(cls, _dict: Dict) -> 'InstanceNetworkAttachmentReference': 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') if (virtual_network_interface := _dict.get('virtual_network_interface')) is not None: - args['virtual_network_interface'] = VirtualNetworkInterfaceReferenceAttachmentContext.from_dict( - virtual_network_interface - ) + args['virtual_network_interface'] = VirtualNetworkInterfaceReferenceAttachmentContext.from_dict(virtual_network_interface) else: - raise ValueError( - 'Required property \'virtual_network_interface\' not present in InstanceNetworkAttachmentReference JSON' - ) + raise ValueError('Required property \'virtual_network_interface\' not present in InstanceNetworkAttachmentReference JSON') return cls(**args) @classmethod @@ -57833,6 +58641,7 @@ class ResourceTypeEnum(str, Enum): INSTANCE_NETWORK_ATTACHMENT = 'instance_network_attachment' + class InstancePatch: """ InstancePatch. @@ -58045,6 +58854,7 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' + class InstancePatchProfile: """ The profile to use for this virtual server instance. Any disks associated with the @@ -58069,12 +58879,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'InstancePatchProfileInstanceProfileIdentityByName', - 'InstancePatchProfileInstanceProfileIdentityByHref', - ] - ) + ", ".join(['InstancePatchProfileInstanceProfileIdentityByName', 'InstancePatchProfileInstanceProfileIdentityByHref']) ) raise Exception(msg) @@ -58093,13 +58898,7 @@ def __init__( """ 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) @@ -58118,12 +58917,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'InstancePlacementTargetPatchDedicatedHostIdentity', - 'InstancePlacementTargetPatchDedicatedHostGroupIdentity', - ] - ) + ", ".join(['InstancePlacementTargetPatchDedicatedHostIdentity', 'InstancePlacementTargetPatchDedicatedHostGroupIdentity']) ) raise Exception(msg) @@ -58142,13 +58936,7 @@ def __init__( """ 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) @@ -58318,13 +59106,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfile': if (cluster_network_attachment_count := _dict.get('cluster_network_attachment_count')) is not None: args['cluster_network_attachment_count'] = cluster_network_attachment_count else: - raise ValueError( - 'Required property \'cluster_network_attachment_count\' not present in InstanceProfile JSON' - ) + raise ValueError('Required property \'cluster_network_attachment_count\' 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 - ) + 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: @@ -58390,13 +59174,9 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfile': else: raise ValueError('Required property \'status\' not present in InstanceProfile JSON') if (supported_cluster_network_profiles := _dict.get('supported_cluster_network_profiles')) is not None: - args['supported_cluster_network_profiles'] = [ - ClusterNetworkProfileReference.from_dict(v) for v in supported_cluster_network_profiles - ] + args['supported_cluster_network_profiles'] = [ClusterNetworkProfileReference.from_dict(v) for v in supported_cluster_network_profiles] else: - raise ValueError( - 'Required property \'supported_cluster_network_profiles\' not present in InstanceProfile JSON' - ) + raise ValueError('Required property \'supported_cluster_network_profiles\' 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: @@ -58571,6 +59351,7 @@ class ResourceTypeEnum(str, Enum): INSTANCE_PROFILE = 'instance_profile' + class StatusEnum(str, Enum): """ The status of the instance profile: @@ -58591,6 +59372,7 @@ class StatusEnum(str, Enum): PREVIOUS = 'previous' + class InstanceProfileBandwidth: """ InstanceProfileBandwidth. @@ -58605,14 +59387,7 @@ def __init__( """ 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) @@ -58631,13 +59406,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'InstanceProfileClusterNetworkAttachmentCountDependent', - 'InstanceProfileClusterNetworkAttachmentCountEnum', - 'InstanceProfileClusterNetworkAttachmentCountRange', - ] - ) + ", ".join(['InstanceProfileClusterNetworkAttachmentCountDependent', 'InstanceProfileClusterNetworkAttachmentCountEnum', 'InstanceProfileClusterNetworkAttachmentCountRange']) ) raise Exception(msg) @@ -58748,9 +59517,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileDisk': 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 - ) + 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) @@ -58813,14 +59580,7 @@ def __init__( """ 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) @@ -58839,14 +59599,7 @@ def __init__( """ 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) @@ -58948,6 +59701,7 @@ class DefaultEnum(str, Enum): NVME = 'nvme' VIRTIO_BLK = 'virtio_blk' + class TypeEnum(str, Enum): """ The type for this profile field. @@ -58955,6 +59709,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class ValuesEnum(str, Enum): """ The disk interface used for attaching the disk. @@ -58967,6 +59722,7 @@ class ValuesEnum(str, Enum): VIRTIO_BLK = 'virtio_blk' + class InstanceProfileGPU: """ InstanceProfileGPU. @@ -58981,14 +59737,7 @@ def __init__( """ 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) @@ -59071,6 +59820,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class InstanceProfileGPUMemory: """ InstanceProfileGPUMemory. @@ -59085,14 +59835,7 @@ def __init__( """ 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) @@ -59175,6 +59918,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class InstanceProfileIdentity: """ Identifies an instance profile by a unique property. @@ -59208,14 +59952,7 @@ def __init__( """ 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) @@ -59367,6 +60104,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class InstanceProfilePortSpeed: """ InstanceProfilePortSpeed. @@ -59474,6 +60212,7 @@ class ResourceTypeEnum(str, Enum): INSTANCE_PROFILE = 'instance_profile' + class InstanceProfileReservationTerms: """ InstanceProfileReservationTerms. @@ -59551,6 +60290,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class ValuesEnum(str, Enum): """ values. @@ -59560,6 +60300,7 @@ class ValuesEnum(str, Enum): THREE_YEAR = 'three_year' + class InstanceProfileSupportedConfidentialComputeModes: """ InstanceProfileSupportedConfidentialComputeModes. @@ -59593,21 +60334,15 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileSupportedConfidentialComputeM if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError( - 'Required property \'default\' not present in InstanceProfileSupportedConfidentialComputeModes JSON' - ) + 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' - ) + 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' - ) + raise ValueError('Required property \'values\' not present in InstanceProfileSupportedConfidentialComputeModes JSON') return cls(**args) @classmethod @@ -59652,6 +60387,7 @@ class DefaultEnum(str, Enum): DISABLED = 'disabled' SGX = 'sgx' + class TypeEnum(str, Enum): """ The type for this profile field. @@ -59659,6 +60395,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class ValuesEnum(str, Enum): """ The confidential compute modes: @@ -59673,6 +60410,7 @@ class ValuesEnum(str, Enum): SGX = 'sgx' + class InstanceProfileSupportedSecureBootModes: """ InstanceProfileSupportedSecureBootModes. @@ -59708,9 +60446,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileSupportedSecureBootModes': if (default := _dict.get('default')) is not None: args['default'] = default else: - raise ValueError( - 'Required property \'default\' not present in InstanceProfileSupportedSecureBootModes JSON' - ) + raise ValueError('Required property \'default\' not present in InstanceProfileSupportedSecureBootModes JSON') if (type := _dict.get('type')) is not None: args['type'] = type else: @@ -59763,6 +60499,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class InstanceProfileVCPU: """ InstanceProfileVCPU. @@ -59777,14 +60514,7 @@ def __init__( """ 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) @@ -59876,6 +60606,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class InstanceProfileVCPUManufacturer: """ InstanceProfileVCPUManufacturer. @@ -59963,6 +60694,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class InstanceProfileVolumeBandwidth: """ InstanceProfileVolumeBandwidth. @@ -59977,14 +60709,7 @@ def __init__( """ 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) @@ -60165,15 +60890,7 @@ 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) @@ -60188,6 +60905,7 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' + class InstanceReference: """ InstanceReference. @@ -60301,10 +61019,15 @@ class InstanceReservationAffinity: :param str policy: The reservation affinity policy to use for this virtual server instance: + - `automatic`: Any reservations with an `affinity_policy` of `automatic` + that have the same `profile` and `zone` as this virtual server instance + are available for use. - `disabled`: Reservations will not be used - `manual`: Reservations in `pool` are available for use. :param List[ReservationReference] pool: The pool of reservations available for - use by this virtual server instance. + use by this virtual server instance when the `policy` is `manual`. This must be + empty if the `policy` is `automatic` or + `disabled`. """ def __init__( @@ -60317,10 +61040,15 @@ def __init__( :param str policy: The reservation affinity policy to use for this virtual server instance: + - `automatic`: Any reservations with an `affinity_policy` of `automatic` + that have the same `profile` and `zone` as this virtual server instance + are available for use. - `disabled`: Reservations will not be used - `manual`: Reservations in `pool` are available for use. :param List[ReservationReference] pool: The pool of reservations available - for use by this virtual server instance. + for use by this virtual server instance when the `policy` is `manual`. This + must be empty if the `policy` is `automatic` or + `disabled`. """ self.policy = policy self.pool = pool @@ -60380,20 +61108,28 @@ def __ne__(self, other: 'InstanceReservationAffinity') -> bool: class PolicyEnum(str, Enum): """ The reservation affinity policy to use for this virtual server instance: + - `automatic`: Any reservations with an `affinity_policy` of `automatic` + that have the same `profile` and `zone` as this virtual server instance + are available for use. - `disabled`: Reservations will not be used - `manual`: Reservations in `pool` are available for use. """ + AUTOMATIC = 'automatic' DISABLED = 'disabled' MANUAL = 'manual' + class InstanceReservationAffinityPatch: """ InstanceReservationAffinityPatch. :param str policy: (optional) The reservation affinity policy to use for this virtual server instance: + - `automatic`: Any reservations with an `affinity_policy` of `automatic` + that have the same `profile` and `zone` as this virtual server instance + are available for use. - `disabled`: Reservations will not be used - `manual`: Reservations in `pool` will be available for use The policy must be `disabled` if `placement_target` is set. @@ -60403,7 +61139,8 @@ class InstanceReservationAffinityPatch: Specified reservations must have a `status` of `active`, and have the same `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. + `disabled` or `automatic`, `pool` must be empty. If `policy` is `manual`, the + `pool` must contain a reservation with available capacity. """ def __init__( @@ -60417,6 +61154,9 @@ def __init__( :param str policy: (optional) The reservation affinity policy to use for this virtual server instance: + - `automatic`: Any reservations with an `affinity_policy` of `automatic` + that have the same `profile` and `zone` as this virtual server instance + are available for use. - `disabled`: Reservations will not be used - `manual`: Reservations in `pool` will be available for use The policy must be `disabled` if `placement_target` is set. @@ -60426,7 +61166,8 @@ def __init__( Specified reservations must have a `status` of `active`, and have the same `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. + `disabled` or `automatic`, `pool` must be empty. If `policy` is `manual`, + the `pool` must contain a reservation with available capacity. """ self.policy = policy self.pool = pool @@ -60482,15 +61223,20 @@ def __ne__(self, other: 'InstanceReservationAffinityPatch') -> bool: class PolicyEnum(str, Enum): """ The reservation affinity policy to use for this virtual server instance: + - `automatic`: Any reservations with an `affinity_policy` of `automatic` + that have the same `profile` and `zone` as this virtual server instance + are available for use. - `disabled`: Reservations will not be used - `manual`: Reservations in `pool` will be available for use The policy must be `disabled` if `placement_target` is set. """ + AUTOMATIC = 'automatic' DISABLED = 'disabled' MANUAL = 'manual' + class InstanceReservationAffinityPrototype: """ InstanceReservationAffinityPrototype. @@ -60499,15 +61245,23 @@ class InstanceReservationAffinityPrototype: virtual server instance: - `disabled`: Reservations will not be used - `manual`: Reservations in `pool` will be available for use - The policy will default to `manual` if `pool` is not empty, and `disabled` - otherwise. + - `automatic`: Reservations with an `affinity_policy` of `automatic` that have + the same + `profile` and `zone` as this virtual server instance will be available for + use. + The policy will default to `manual` if `pool` is not empty. The policy will + default to + `disabled` if a `placement_target` is set. The policy will default to + `automatic` in all other cases. + The policy must be `disabled` if `placement_target` is specified. :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. - 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. + If `policy` is `manual`, `pool` must be specified with one reservation. If + `policy` is `disabled` or `automatic` and `pool` is specified, it must be empty. + If `policy` is `manual`, the `pool` must contain a reservation with available + capacity. """ def __init__( @@ -60523,15 +61277,23 @@ def __init__( this virtual server instance: - `disabled`: Reservations will not be used - `manual`: Reservations in `pool` will be available for use - The policy will default to `manual` if `pool` is not empty, and `disabled` - otherwise. + - `automatic`: Reservations with an `affinity_policy` of `automatic` that + have the same + `profile` and `zone` as this virtual server instance will be available + for use. + The policy will default to `manual` if `pool` is not empty. The policy will + default to + `disabled` if a `placement_target` is set. The policy will default to + `automatic` in all other cases. + The policy must be `disabled` if `placement_target` is specified. :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. - 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. + If `policy` is `manual`, `pool` must be specified with one reservation. If + `policy` is `disabled` or `automatic` and `pool` is specified, it must be + empty. If `policy` is `manual`, the `pool` must contain a reservation with + available capacity. """ self.policy = policy self.pool = pool @@ -60589,14 +61351,22 @@ 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` will be available for use - The policy will default to `manual` if `pool` is not empty, and `disabled` - otherwise. + - `automatic`: Reservations with an `affinity_policy` of `automatic` that have the + same + `profile` and `zone` as this virtual server instance will be available for use. + The policy will default to `manual` if `pool` is not empty. The policy will + default to + `disabled` if a `placement_target` is set. The policy will default to `automatic` + in all other cases. + The policy must be `disabled` if `placement_target` is specified. """ + AUTOMATIC = 'automatic' DISABLED = 'disabled' MANUAL = 'manual' + class InstanceStatusReason: """ InstanceStatusReason. @@ -60704,6 +61474,7 @@ class CodeEnum(str, Enum): STOPPED_FOR_IMAGE_CREATION = 'stopped_for_image_creation' + class InstanceTemplate: """ InstanceTemplate. @@ -60886,13 +61657,7 @@ 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) @@ -60907,6 +61672,7 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' + class InstanceTemplateCollection: """ InstanceTemplateCollection. @@ -61037,9 +61803,7 @@ def __init__( """ 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) @@ -61278,14 +62042,7 @@ 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) @@ -61300,6 +62057,7 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' + class InstanceTemplateReference: """ InstanceTemplateReference. @@ -61665,6 +62423,7 @@ class TypeEnum(str, Enum): RSA = 'rsa' + class KeyCollection: """ KeyCollection. @@ -62404,14 +63163,10 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancer': args['security_groups_supported'] = security_groups_supported else: raise ValueError('Required property \'security_groups_supported\' not present in LoadBalancer JSON') - if ( - source_ip_session_persistence_supported := _dict.get('source_ip_session_persistence_supported') - ) is not None: + if (source_ip_session_persistence_supported := _dict.get('source_ip_session_persistence_supported')) is not None: args['source_ip_session_persistence_supported'] = source_ip_session_persistence_supported else: - raise ValueError( - 'Required property \'source_ip_session_persistence_supported\' not present in LoadBalancer JSON' - ) + raise ValueError('Required property \'source_ip_session_persistence_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: @@ -62522,10 +63277,7 @@ def to_dict(self) -> Dict: _dict['security_groups'] = security_groups_list 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, 'source_ip_session_persistence_supported') - and self.source_ip_session_persistence_supported is not None - ): + if hasattr(self, 'source_ip_session_persistence_supported') and self.source_ip_session_persistence_supported is not None: _dict['source_ip_session_persistence_supported'] = self.source_ip_session_persistence_supported if hasattr(self, 'subnets') and self.subnets is not None: subnets_list = [] @@ -62572,6 +63324,7 @@ class AccessModeEnum(str, Enum): PRIVATE_PATH = 'private_path' PUBLIC = 'public' + class AvailabilityEnum(str, Enum): """ The availability of this load balancer: @@ -62587,6 +63340,7 @@ class AvailabilityEnum(str, Enum): REGION = 'region' SUBNET = 'subnet' + class OperatingStatusEnum(str, Enum): """ The operating status of this load balancer. @@ -62598,6 +63352,7 @@ class OperatingStatusEnum(str, Enum): OFFLINE = 'offline' ONLINE = 'online' + class ProvisioningStatusEnum(str, Enum): """ The provisioning status of this load balancer: @@ -62624,6 +63379,7 @@ class ProvisioningStatusEnum(str, Enum): MIGRATE_PENDING = 'migrate_pending' UPDATE_PENDING = 'update_pending' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -62632,6 +63388,7 @@ class ResourceTypeEnum(str, Enum): LOAD_BALANCER = 'load_balancer' + class LoadBalancerCollection: """ LoadBalancerCollection. @@ -63312,6 +64069,7 @@ class ProtocolEnum(str, Enum): TCP = 'tcp' UDP = 'udp' + class ProvisioningStatusEnum(str, Enum): """ The provisioning status of this listener @@ -63327,6 +64085,7 @@ class ProvisioningStatusEnum(str, Enum): UPDATE_PENDING = 'update_pending' + class LoadBalancerListenerCollection: """ LoadBalancerListenerCollection. @@ -63414,12 +64173,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById', - 'LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref', - ] - ) + ", ".join(['LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById', 'LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityByHref']) ) raise Exception(msg) @@ -63458,9 +64212,7 @@ 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: @@ -63623,15 +64375,11 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerHTTPSRedirectPrototype': 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) @@ -63966,6 +64714,7 @@ class ProtocolEnum(str, Enum): UDP = 'udp' + class LoadBalancerListenerPolicy: """ LoadBalancerListenerPolicy. @@ -64176,6 +64925,7 @@ class ActionEnum(str, Enum): REDIRECT = 'redirect' REJECT = 'reject' + class ProvisioningStatusEnum(str, Enum): """ The provisioning status of this policy @@ -64191,6 +64941,7 @@ class ProvisioningStatusEnum(str, Enum): UPDATE_PENDING = 'update_pending' + class LoadBalancerListenerPolicyCollection: """ LoadBalancerListenerPolicyCollection. @@ -64514,6 +65265,7 @@ class ActionEnum(str, Enum): REJECT = 'reject' + class LoadBalancerListenerPolicyReference: """ LoadBalancerListenerPolicyReference. @@ -64713,9 +65465,7 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerPolicyRule': 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: @@ -64782,6 +65532,7 @@ class ConditionEnum(str, Enum): EQUALS = 'equals' MATCHES_REGEX = 'matches_regex' + class ProvisioningStatusEnum(str, Enum): """ The provisioning status of this rule @@ -64796,6 +65547,7 @@ class ProvisioningStatusEnum(str, Enum): FAILED = 'failed' UPDATE_PENDING = 'update_pending' + class TypeEnum(str, Enum): """ The type of the rule. Body rules are applied to form-encoded request bodies using @@ -64813,6 +65565,7 @@ class TypeEnum(str, Enum): QUERY = 'query' + class LoadBalancerListenerPolicyRuleCollection: """ LoadBalancerListenerPolicyRuleCollection. @@ -64988,6 +65741,7 @@ class ConditionEnum(str, Enum): EQUALS = 'equals' MATCHES_REGEX = 'matches_regex' + class TypeEnum(str, Enum): """ The type of the rule. Body rules are applied to form-encoded request bodies using @@ -65002,6 +65756,7 @@ class TypeEnum(str, Enum): QUERY = 'query' + class LoadBalancerListenerPolicyRulePrototype: """ LoadBalancerListenerPolicyRulePrototype. @@ -65057,9 +65812,7 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerPolicyRulePrototype': 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: @@ -65117,6 +65870,7 @@ class ConditionEnum(str, Enum): EQUALS = 'equals' MATCHES_REGEX = 'matches_regex' + class TypeEnum(str, Enum): """ The type of the rule. Body rules are applied to form-encoded request bodies using @@ -65131,6 +65885,7 @@ class TypeEnum(str, Enum): QUERY = 'query' + class LoadBalancerListenerPolicyRuleReference: """ LoadBalancerListenerPolicyRuleReference. @@ -65236,13 +65991,7 @@ def __init__( """ 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) @@ -65264,13 +66013,7 @@ def __init__( """ 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) @@ -65295,13 +66038,7 @@ def __init__( """ 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) @@ -65324,7 +66061,7 @@ class LoadBalancerListenerPrototypeLoadBalancerContext: `protocol` of `https`. :param int connection_limit: (optional) The concurrent connection limit for the listener. If reached, incoming connections may be queued or rejected. - This property will be present for load balancers in the `application` family. + Supported for load balancers in the `application` family. :param LoadBalancerPoolIdentityByName default_pool: (optional) The default pool for this listener. If `https_redirect` is specified, the default pool will not be used. If specified, the pool must: @@ -65423,8 +66160,7 @@ def __init__( `protocol` of `https`. :param int connection_limit: (optional) The concurrent connection limit for the listener. If reached, incoming connections may be queued or rejected. - This property will be present for load balancers in the `application` - family. + Supported for load balancers in the `application` family. :param LoadBalancerPoolIdentityByName default_pool: (optional) The default pool for this listener. If `https_redirect` is specified, the default pool will not be used. If specified, the pool must: @@ -65502,9 +66238,7 @@ 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 @@ -65584,6 +66318,7 @@ class ProtocolEnum(str, Enum): UDP = 'udp' + class LoadBalancerListenerReference: """ LoadBalancerListenerReference. @@ -66401,6 +67136,7 @@ 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. @@ -66414,6 +67150,7 @@ class ProtocolEnum(str, Enum): TCP = 'tcp' UDP = 'udp' + class ProvisioningStatusEnum(str, Enum): """ The provisioning status of this pool @@ -66428,6 +67165,7 @@ class ProvisioningStatusEnum(str, Enum): FAILED = 'failed' UPDATE_PENDING = 'update_pending' + class ProxyProtocolEnum(str, Enum): """ The PROXY protocol setting for this pool: @@ -66444,6 +67182,7 @@ class ProxyProtocolEnum(str, Enum): V2 = 'v2' + class LoadBalancerPoolCollection: """ LoadBalancerPoolCollection. @@ -66640,6 +67379,7 @@ class TypeEnum(str, Enum): TCP = 'tcp' + class LoadBalancerPoolHealthMonitorPatch: """ LoadBalancerPoolHealthMonitorPatch. @@ -66769,6 +67509,7 @@ class TypeEnum(str, Enum): TCP = 'tcp' + class LoadBalancerPoolHealthMonitorPrototype: """ LoadBalancerPoolHealthMonitorPrototype. @@ -66831,9 +67572,7 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolHealthMonitorPrototype': 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: @@ -66898,6 +67637,7 @@ class TypeEnum(str, Enum): TCP = 'tcp' + class LoadBalancerPoolIdentity: """ Identifies a load balancer pool by a unique property. @@ -66912,12 +67652,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'LoadBalancerPoolIdentityLoadBalancerPoolIdentityById', - 'LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref', - ] - ) + ", ".join(['LoadBalancerPoolIdentityLoadBalancerPoolIdentityById', 'LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref']) ) raise Exception(msg) @@ -67004,13 +67739,9 @@ class LoadBalancerPoolMember: The enumerated values for this property may [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. - :param LoadBalancerPoolMemberTarget target: The pool member target. Load - balancers in the `network` family support virtual server - instances. Load balancers in the `application` family support IP addresses. If - the load - balancer has route mode enabled, the member must be in a zone the load balancer - has a - subnet in. + :param LoadBalancerPoolMemberTarget target: The pool member target. If the load + balancer has route mode enabled, the member must be + in a zone the load balancer has a subnet in. :param int weight: (optional) The weight of the server member. This property will be present if the pool algorithm is `weighted_round_robin`. """ @@ -67048,13 +67779,9 @@ def __init__( The enumerated values for this property may [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. - :param LoadBalancerPoolMemberTarget target: The pool member target. Load - balancers in the `network` family support virtual server - instances. Load balancers in the `application` family support IP addresses. - If the load - balancer has route mode enabled, the member must be in a zone the load - balancer has a - subnet in. + :param LoadBalancerPoolMemberTarget target: The pool member target. If the + load balancer has route mode enabled, the member must be + in a zone the load balancer has a subnet in. :param int weight: (optional) The weight of the server member. This property will be present if the pool algorithm is `weighted_round_robin`. @@ -67163,6 +67890,7 @@ class HealthEnum(str, Enum): OK = 'ok' UNKNOWN = 'unknown' + class ProvisioningStatusEnum(str, Enum): """ The provisioning status of this member @@ -67178,6 +67906,7 @@ class ProvisioningStatusEnum(str, Enum): UPDATE_PENDING = 'update_pending' + class LoadBalancerPoolMemberCollection: """ LoadBalancerPoolMemberCollection. @@ -67258,12 +67987,8 @@ class LoadBalancerPoolMemberPatch: The port must be unique across all members for all pools associated with this pool's listener. :param LoadBalancerPoolMemberTargetPrototype target: (optional) The pool member - target. Load balancers in the `network` family support virtual server - instances. Load balancers in the `application` family support IP addresses. If - the load - balancer has route mode enabled, the member must be in a zone the load balancer - has a - subnet in. + target. If the load balancer has route mode enabled, the member must be + in a zone the load balancer has a subnet in. :param int weight: (optional) The weight of the server member. If specified, the pool algorithm must be `weighted_round_robin`. """ @@ -67288,13 +68013,9 @@ def __init__( The port must be unique across all members for all pools associated with this pool's listener. :param LoadBalancerPoolMemberTargetPrototype target: (optional) The pool - member target. Load balancers in the `network` family support virtual - server - instances. Load balancers in the `application` family support IP addresses. - If the load - balancer has route mode enabled, the member must be in a zone the load - balancer has a - subnet in. + member target. If the load balancer has route mode enabled, the member must + be + in a zone the load balancer has a subnet in. :param int weight: (optional) The weight of the server member. If specified, the pool algorithm must be `weighted_round_robin`. """ @@ -67364,13 +68085,9 @@ class LoadBalancerPoolMemberPrototype: `health_monitor` property is specified. The port must be unique across all members for all pools associated with this pool's listener. - :param LoadBalancerPoolMemberTargetPrototype target: The pool member target. - Load balancers in the `network` family support virtual server - instances. Load balancers in the `application` family support IP addresses. If - the load - balancer has route mode enabled, the member must be in a zone the load balancer - has a - subnet in. + :param LoadBalancerPoolMemberTargetPrototype target: The pool member target. If + the load balancer has route mode enabled, the member must be + in a zone the load balancer has a subnet in. :param int weight: (optional) The weight of the server member. If specified, the pool algorithm must be `weighted_round_robin`. """ @@ -67395,12 +68112,8 @@ def __init__( The port must be unique across all members for all pools associated with this pool's listener. :param LoadBalancerPoolMemberTargetPrototype target: The pool member - target. Load balancers in the `network` family support virtual server - instances. Load balancers in the `application` family support IP addresses. - If the load - balancer has route mode enabled, the member must be in a zone the load - balancer has a - subnet in. + target. If the load balancer has route mode enabled, the member must be + in a zone the load balancer has a subnet in. :param int weight: (optional) The weight of the server member. If specified, the pool algorithm must be `weighted_round_robin`. """ @@ -67549,10 +68262,8 @@ def __ne__(self, other: 'LoadBalancerPoolMemberReference') -> bool: class LoadBalancerPoolMemberTarget: """ - The pool member target. Load balancers in the `network` family support virtual server - instances. Load balancers in the `application` family support IP addresses. If the - load balancer has route mode enabled, the member must be in a zone the load balancer - has a subnet in. + The pool member target. If the load balancer has route mode enabled, the member must + be in a zone the load balancer has a subnet in. """ @@ -67571,10 +68282,8 @@ def __init__( class LoadBalancerPoolMemberTargetPrototype: """ - The pool member target. Load balancers in the `network` family support virtual server - instances. Load balancers in the `application` family support IP addresses. If the - load balancer has route mode enabled, the member must be in a zone the load balancer - has a subnet in. + The pool member target. If the load balancer has route mode enabled, the member must + be in a zone the load balancer has a subnet in. """ @@ -67586,9 +68295,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - ['LoadBalancerPoolMemberTargetPrototypeInstanceIdentity', 'LoadBalancerPoolMemberTargetPrototypeIP'] - ) + ", ".join(['LoadBalancerPoolMemberTargetPrototypeInstanceIdentity', 'LoadBalancerPoolMemberTargetPrototypeIP']) ) raise Exception(msg) @@ -67740,6 +68447,7 @@ 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. @@ -67756,6 +68464,7 @@ class ProtocolEnum(str, Enum): TCP = 'tcp' UDP = 'udp' + class ProxyProtocolEnum(str, Enum): """ The PROXY protocol setting for this pool: @@ -67770,6 +68479,7 @@ class ProxyProtocolEnum(str, Enum): V2 = 'v2' + class LoadBalancerPoolPrototype: """ LoadBalancerPoolPrototype. @@ -67947,6 +68657,7 @@ 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` @@ -67960,6 +68671,7 @@ class ProtocolEnum(str, Enum): TCP = 'tcp' UDP = 'udp' + class ProxyProtocolEnum(str, Enum): """ The PROXY protocol setting for this pool: @@ -67974,6 +68686,7 @@ class ProxyProtocolEnum(str, Enum): V2 = 'v2' + class LoadBalancerPoolReference: """ LoadBalancerPoolReference. @@ -68157,6 +68870,7 @@ class TypeEnum(str, Enum): SOURCE_IP = 'source_ip' + class LoadBalancerPoolSessionPersistencePatch: """ The session persistence configuration. Specify `null` to remove any existing session @@ -68245,6 +68959,7 @@ class TypeEnum(str, Enum): SOURCE_IP = 'source_ip' + class LoadBalancerPoolSessionPersistencePrototype: """ LoadBalancerPoolSessionPersistencePrototype. @@ -68287,9 +69002,7 @@ 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 @@ -68336,6 +69049,7 @@ class TypeEnum(str, Enum): SOURCE_IP = 'source_ip' + class LoadBalancerProfile: """ LoadBalancerProfile. @@ -68447,14 +69161,10 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerProfile': args['security_groups_supported'] = security_groups_supported else: raise ValueError('Required property \'security_groups_supported\' not present in LoadBalancerProfile JSON') - if ( - source_ip_session_persistence_supported := _dict.get('source_ip_session_persistence_supported') - ) is not None: + if (source_ip_session_persistence_supported := _dict.get('source_ip_session_persistence_supported')) is not None: args['source_ip_session_persistence_supported'] = source_ip_session_persistence_supported else: - raise ValueError( - 'Required property \'source_ip_session_persistence_supported\' not present in LoadBalancerProfile JSON' - ) + raise ValueError('Required property \'source_ip_session_persistence_supported\' not present in LoadBalancerProfile JSON') if (udp_supported := _dict.get('udp_supported')) is not None: args['udp_supported'] = udp_supported else: @@ -68505,16 +69215,11 @@ def to_dict(self) -> Dict: _dict['security_groups_supported'] = self.security_groups_supported else: _dict['security_groups_supported'] = self.security_groups_supported.to_dict() - if ( - hasattr(self, 'source_ip_session_persistence_supported') - and self.source_ip_session_persistence_supported is not None - ): + if hasattr(self, 'source_ip_session_persistence_supported') and self.source_ip_session_persistence_supported is not None: if isinstance(self.source_ip_session_persistence_supported, dict): _dict['source_ip_session_persistence_supported'] = self.source_ip_session_persistence_supported else: - _dict['source_ip_session_persistence_supported'] = ( - self.source_ip_session_persistence_supported.to_dict() - ) + _dict['source_ip_session_persistence_supported'] = self.source_ip_session_persistence_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 @@ -68552,6 +69257,7 @@ class FamilyEnum(str, Enum): NETWORK = 'network' + class LoadBalancerProfileAccessModes: """ LoadBalancerProfileAccessModes. @@ -68629,6 +69335,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class ValuesEnum(str, Enum): """ The access mode for this load balancer: @@ -68645,6 +69352,7 @@ class ValuesEnum(str, Enum): PUBLIC = 'public' + class LoadBalancerProfileAvailability: """ LoadBalancerProfileAvailability. @@ -68814,12 +69522,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'LoadBalancerProfileInstanceGroupsSupportedFixed', - 'LoadBalancerProfileInstanceGroupsSupportedDependent', - ] - ) + ", ".join(['LoadBalancerProfileInstanceGroupsSupportedFixed', 'LoadBalancerProfileInstanceGroupsSupportedDependent']) ) raise Exception(msg) @@ -68902,6 +69605,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class LoadBalancerProfileReference: """ LoadBalancerProfileReference. @@ -68999,6 +69703,7 @@ class FamilyEnum(str, Enum): NETWORK = 'network' + class LoadBalancerProfileRouteModeSupported: """ LoadBalancerProfileRouteModeSupported. @@ -69032,12 +69737,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'LoadBalancerProfileSecurityGroupsSupportedFixed', - 'LoadBalancerProfileSecurityGroupsSupportedDependent', - ] - ) + ", ".join(['LoadBalancerProfileSecurityGroupsSupportedFixed', 'LoadBalancerProfileSecurityGroupsSupportedDependent']) ) raise Exception(msg) @@ -69056,12 +69756,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'LoadBalancerProfileSourceIPSessionPersistenceSupportedFixed', - 'LoadBalancerProfileSourceIPSessionPersistenceSupportedDependent', - ] - ) + ", ".join(['LoadBalancerProfileSourceIPSessionPersistenceSupportedFixed', 'LoadBalancerProfileSourceIPSessionPersistenceSupportedDependent']) ) raise Exception(msg) @@ -69209,6 +69904,7 @@ class ResourceTypeEnum(str, Enum): LOAD_BALANCER = 'load_balancer' + class LoadBalancerStatistics: """ LoadBalancerStatistics. @@ -69260,9 +69956,7 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerStatistics': 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: @@ -69869,13 +70563,7 @@ 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) @@ -69886,13 +70574,7 @@ 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) @@ -69928,6 +70610,7 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' + class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -69936,6 +70619,7 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' + class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -69943,6 +70627,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class ProtocolEnum(str, Enum): """ The network protocol. @@ -69954,6 +70639,7 @@ class ProtocolEnum(str, Enum): UDP = 'udp' + class NetworkACLRuleBeforePatch: """ The rule to move this rule immediately before. @@ -69969,12 +70655,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'NetworkACLRuleBeforePatchNetworkACLRuleIdentityById', - 'NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref', - ] - ) + ", ".join(['NetworkACLRuleBeforePatchNetworkACLRuleIdentityById', 'NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref']) ) raise Exception(msg) @@ -69994,12 +70675,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById', - 'NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref', - ] - ) + ", ".join(['NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById', 'NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref']) ) raise Exception(msg) @@ -70181,13 +70857,7 @@ 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) @@ -70198,13 +70868,7 @@ 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) @@ -70240,6 +70904,7 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' + class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -70248,6 +70913,7 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' + class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -70255,6 +70921,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class ProtocolEnum(str, Enum): """ The network protocol. @@ -70266,6 +70933,7 @@ class ProtocolEnum(str, Enum): UDP = 'udp' + class NetworkACLRulePatch: """ NetworkACLRulePatch. @@ -70287,7 +70955,6 @@ class NetworkACLRulePatch: :param str direction: (optional) The direction of traffic to match. :param str name: (optional) The name for this network ACL rule. The name must not be used by another rule for the network ACL. - :param str protocol: (optional) The network protocol. :param str source: (optional) The source IP address or CIDR block to match. The CIDR block `0.0.0.0/0` matches all source addresses. :param int source_port_max: (optional) The inclusive upper bound of TCP/UDP @@ -70309,7 +70976,6 @@ def __init__( destination_port_min: Optional[int] = None, direction: Optional[str] = None, name: Optional[str] = None, - protocol: Optional[str] = None, source: Optional[str] = None, source_port_max: Optional[int] = None, source_port_min: Optional[int] = None, @@ -70335,7 +71001,6 @@ def __init__( :param str direction: (optional) The direction of traffic to match. :param str name: (optional) The name for this network ACL rule. The name must not be used by another rule for the network ACL. - :param str protocol: (optional) The network protocol. :param str source: (optional) The source IP address or CIDR block to match. The CIDR block `0.0.0.0/0` matches all source addresses. :param int source_port_max: (optional) The inclusive upper bound of TCP/UDP @@ -70353,7 +71018,6 @@ def __init__( self.destination_port_min = destination_port_min self.direction = direction self.name = name - self.protocol = protocol self.source = source self.source_port_max = source_port_max self.source_port_min = source_port_min @@ -70379,8 +71043,6 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRulePatch': args['direction'] = direction if (name := _dict.get('name')) is not None: args['name'] = name - if (protocol := _dict.get('protocol')) is not None: - args['protocol'] = protocol if (source := _dict.get('source')) is not None: args['source'] = source if (source_port_max := _dict.get('source_port_max')) is not None: @@ -70418,8 +71080,6 @@ def to_dict(self) -> Dict: _dict['direction'] = self.direction if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name - if hasattr(self, 'protocol') and self.protocol is not None: - _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: @@ -70456,6 +71116,7 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' + class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -70464,15 +71125,6 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' - class ProtocolEnum(str, Enum): - """ - The network protocol. - """ - - ALL = 'all' - ICMP = 'icmp' - TCP = 'tcp' - UDP = 'udp' class NetworkACLRulePrototype: @@ -70526,13 +71178,7 @@ 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) @@ -70543,13 +71189,7 @@ 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) @@ -70585,6 +71225,7 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' + class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -70593,6 +71234,7 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' + class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -70600,6 +71242,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class ProtocolEnum(str, Enum): """ The network protocol. @@ -70611,6 +71254,7 @@ class ProtocolEnum(str, Enum): UDP = 'udp' + class NetworkACLRulePrototypeNetworkACLContext: """ NetworkACLRulePrototypeNetworkACLContext. @@ -70655,13 +71299,7 @@ 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) @@ -70672,13 +71310,7 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRulePrototypeNetworkACLContext': 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) @@ -70696,9 +71328,7 @@ def _get_class_by_discriminator(cls, _dict: Dict) -> object: 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) @@ -70716,6 +71346,7 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' + class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -70724,6 +71355,7 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' + class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -70731,6 +71363,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class ProtocolEnum(str, Enum): """ The network protocol. @@ -70742,6 +71375,7 @@ class ProtocolEnum(str, Enum): UDP = 'udp' + class NetworkACLRuleReference: """ NetworkACLRuleReference. @@ -71152,6 +71786,7 @@ class ResourceTypeEnum(str, Enum): NETWORK_INTERFACE = 'network_interface' + class StatusEnum(str, Enum): """ The status of the instance network interface. @@ -71166,6 +71801,7 @@ class StatusEnum(str, Enum): FAILED = 'failed' PENDING = 'pending' + class TypeEnum(str, Enum): """ The instance network interface type. @@ -71180,6 +71816,7 @@ class TypeEnum(str, Enum): SECONDARY = 'secondary' + class NetworkInterfaceBareMetalServerContextReference: """ NetworkInterfaceBareMetalServerContextReference. @@ -71259,39 +71896,27 @@ def from_dict(cls, _dict: Dict) -> 'NetworkInterfaceBareMetalServerContextRefere 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 @@ -71353,6 +71978,7 @@ class ResourceTypeEnum(str, Enum): NETWORK_INTERFACE = 'network_interface' + class NetworkInterfaceIPPrototype: """ NetworkInterfaceIPPrototype. @@ -71367,12 +71993,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'NetworkInterfaceIPPrototypeReservedIPIdentity', - 'NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext', - ] - ) + ", ".join(['NetworkInterfaceIPPrototypeReservedIPIdentity', 'NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext']) ) raise Exception(msg) @@ -71464,21 +72085,15 @@ def from_dict(cls, _dict: Dict) -> 'NetworkInterfaceInstanceContextReference': 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 @@ -71540,6 +72155,7 @@ class ResourceTypeEnum(str, Enum): NETWORK_INTERFACE = 'network_interface' + class NetworkInterfacePatch: """ NetworkInterfacePatch. @@ -71794,9 +72410,7 @@ def from_dict(cls, _dict: Dict) -> 'NetworkInterfaceUnpaginatedCollection': if (network_interfaces := _dict.get('network_interfaces')) is not None: 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 @@ -72022,6 +72636,7 @@ class UserDataFormatEnum(str, Enum): IPXE = 'ipxe' + class OperatingSystemCollection: """ OperatingSystemCollection. @@ -72387,6 +73002,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -72394,6 +73010,7 @@ class ResourceTypeEnum(str, Enum): PLACEMENT_GROUP = 'placement_group' + class StrategyEnum(str, Enum): """ The strategy for this placement group: @@ -72408,6 +73025,7 @@ class StrategyEnum(str, Enum): POWER_SPREAD = 'power_spread' + class PlacementGroupCollection: """ PlacementGroupCollection. @@ -72739,29 +73357,19 @@ def from_dict(cls, _dict: Dict) -> 'PrivatePathServiceGateway': if (default_access_policy := _dict.get('default_access_policy')) is not None: args['default_access_policy'] = default_access_policy else: - raise ValueError( - 'Required property \'default_access_policy\' not present in PrivatePathServiceGateway JSON' - ) + raise ValueError('Required property \'default_access_policy\' not present in PrivatePathServiceGateway JSON') if (endpoint_gateway_binding_auto_delete := _dict.get('endpoint_gateway_binding_auto_delete')) is not None: args['endpoint_gateway_binding_auto_delete'] = endpoint_gateway_binding_auto_delete else: - raise ValueError( - 'Required property \'endpoint_gateway_binding_auto_delete\' not present in PrivatePathServiceGateway JSON' - ) - if ( - endpoint_gateway_binding_auto_delete_timeout := _dict.get('endpoint_gateway_binding_auto_delete_timeout') - ) is not None: + raise ValueError('Required property \'endpoint_gateway_binding_auto_delete\' not present in PrivatePathServiceGateway JSON') + if (endpoint_gateway_binding_auto_delete_timeout := _dict.get('endpoint_gateway_binding_auto_delete_timeout')) is not None: args['endpoint_gateway_binding_auto_delete_timeout'] = endpoint_gateway_binding_auto_delete_timeout else: - raise ValueError( - 'Required property \'endpoint_gateway_binding_auto_delete_timeout\' not present in PrivatePathServiceGateway JSON' - ) + raise ValueError('Required property \'endpoint_gateway_binding_auto_delete_timeout\' not present in PrivatePathServiceGateway JSON') if (endpoint_gateway_count := _dict.get('endpoint_gateway_count')) is not None: args['endpoint_gateway_count'] = endpoint_gateway_count else: - raise ValueError( - 'Required property \'endpoint_gateway_count\' not present in PrivatePathServiceGateway JSON' - ) + raise ValueError('Required property \'endpoint_gateway_count\' not present in PrivatePathServiceGateway JSON') if (href := _dict.get('href')) is not None: args['href'] = href else: @@ -72822,15 +73430,9 @@ def to_dict(self) -> Dict: _dict['crn'] = self.crn if hasattr(self, 'default_access_policy') and self.default_access_policy is not None: _dict['default_access_policy'] = self.default_access_policy - if ( - hasattr(self, 'endpoint_gateway_binding_auto_delete') - and self.endpoint_gateway_binding_auto_delete is not None - ): + if hasattr(self, 'endpoint_gateway_binding_auto_delete') and self.endpoint_gateway_binding_auto_delete is not None: _dict['endpoint_gateway_binding_auto_delete'] = self.endpoint_gateway_binding_auto_delete - if ( - hasattr(self, 'endpoint_gateway_binding_auto_delete_timeout') - and self.endpoint_gateway_binding_auto_delete_timeout is not None - ): + if hasattr(self, 'endpoint_gateway_binding_auto_delete_timeout') and self.endpoint_gateway_binding_auto_delete_timeout is not None: _dict['endpoint_gateway_binding_auto_delete_timeout'] = self.endpoint_gateway_binding_auto_delete_timeout if hasattr(self, 'endpoint_gateway_count') and self.endpoint_gateway_count is not None: _dict['endpoint_gateway_count'] = self.endpoint_gateway_count @@ -72894,6 +73496,7 @@ class DefaultAccessPolicyEnum(str, Enum): PERMIT = 'permit' REVIEW = 'review' + class LifecycleStateEnum(str, Enum): """ The lifecycle state of the private path service gateway. @@ -72907,6 +73510,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -72915,6 +73519,7 @@ class ResourceTypeEnum(str, Enum): PRIVATE_PATH_SERVICE_GATEWAY = 'private_path_service_gateway' + class PrivatePathServiceGatewayAccountPolicy: """ PrivatePathServiceGatewayAccountPolicy. @@ -72974,9 +73579,7 @@ def from_dict(cls, _dict: Dict) -> 'PrivatePathServiceGatewayAccountPolicy': if (access_policy := _dict.get('access_policy')) is not None: args['access_policy'] = access_policy else: - raise ValueError( - 'Required property \'access_policy\' not present in PrivatePathServiceGatewayAccountPolicy JSON' - ) + raise ValueError('Required property \'access_policy\' not present in PrivatePathServiceGatewayAccountPolicy JSON') if (account := _dict.get('account')) is not None: args['account'] = AccountReference.from_dict(account) else: @@ -72984,9 +73587,7 @@ def from_dict(cls, _dict: Dict) -> 'PrivatePathServiceGatewayAccountPolicy': 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 PrivatePathServiceGatewayAccountPolicy JSON' - ) + raise ValueError('Required property \'created_at\' not present in PrivatePathServiceGatewayAccountPolicy JSON') if (href := _dict.get('href')) is not None: args['href'] = href else: @@ -72998,9 +73599,7 @@ def from_dict(cls, _dict: Dict) -> 'PrivatePathServiceGatewayAccountPolicy': 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 PrivatePathServiceGatewayAccountPolicy JSON' - ) + raise ValueError('Required property \'resource_type\' not present in PrivatePathServiceGatewayAccountPolicy JSON') return cls(**args) @classmethod @@ -73061,6 +73660,7 @@ class AccessPolicyEnum(str, Enum): PERMIT = 'permit' REVIEW = 'review' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -73069,6 +73669,7 @@ class ResourceTypeEnum(str, Enum): PRIVATE_PATH_SERVICE_GATEWAY_ACCOUNT_POLICY = 'private_path_service_gateway_account_policy' + class PrivatePathServiceGatewayAccountPolicyCollection: """ PrivatePathServiceGatewayAccountPolicyCollection. @@ -73119,29 +73720,21 @@ def from_dict(cls, _dict: Dict) -> 'PrivatePathServiceGatewayAccountPolicyCollec if (account_policies := _dict.get('account_policies')) is not None: args['account_policies'] = [PrivatePathServiceGatewayAccountPolicy.from_dict(v) for v in account_policies] else: - raise ValueError( - 'Required property \'account_policies\' not present in PrivatePathServiceGatewayAccountPolicyCollection JSON' - ) + raise ValueError('Required property \'account_policies\' not present in PrivatePathServiceGatewayAccountPolicyCollection JSON') if (first := _dict.get('first')) is not None: args['first'] = PageLink.from_dict(first) else: - raise ValueError( - 'Required property \'first\' not present in PrivatePathServiceGatewayAccountPolicyCollection JSON' - ) + raise ValueError('Required property \'first\' not present in PrivatePathServiceGatewayAccountPolicyCollection JSON') if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError( - 'Required property \'limit\' not present in PrivatePathServiceGatewayAccountPolicyCollection JSON' - ) + raise ValueError('Required property \'limit\' not present in PrivatePathServiceGatewayAccountPolicyCollection JSON') if (next := _dict.get('next')) is not None: args['next'] = PageLink.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 PrivatePathServiceGatewayAccountPolicyCollection JSON' - ) + raise ValueError('Required property \'total_count\' not present in PrivatePathServiceGatewayAccountPolicyCollection JSON') return cls(**args) @classmethod @@ -73299,6 +73892,7 @@ class AccessPolicyEnum(str, Enum): REVIEW = 'review' + class PrivatePathServiceGatewayCollection: """ PrivatePathServiceGatewayCollection. @@ -73357,19 +73951,13 @@ def from_dict(cls, _dict: Dict) -> 'PrivatePathServiceGatewayCollection': if (next := _dict.get('next')) is not None: args['next'] = PageLink.from_dict(next) if (private_path_service_gateways := _dict.get('private_path_service_gateways')) is not None: - args['private_path_service_gateways'] = [ - PrivatePathServiceGateway.from_dict(v) for v in private_path_service_gateways - ] + args['private_path_service_gateways'] = [PrivatePathServiceGateway.from_dict(v) for v in private_path_service_gateways] else: - raise ValueError( - 'Required property \'private_path_service_gateways\' not present in PrivatePathServiceGatewayCollection JSON' - ) + raise ValueError('Required property \'private_path_service_gateways\' not present in PrivatePathServiceGatewayCollection 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 PrivatePathServiceGatewayCollection JSON' - ) + raise ValueError('Required property \'total_count\' not present in PrivatePathServiceGatewayCollection JSON') return cls(**args) @classmethod @@ -73511,47 +74099,33 @@ def from_dict(cls, _dict: Dict) -> 'PrivatePathServiceGatewayEndpointGatewayBind if (account := _dict.get('account')) is not None: args['account'] = AccountReference.from_dict(account) else: - raise ValueError( - 'Required property \'account\' not present in PrivatePathServiceGatewayEndpointGatewayBinding JSON' - ) + raise ValueError('Required property \'account\' not present in PrivatePathServiceGatewayEndpointGatewayBinding 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 PrivatePathServiceGatewayEndpointGatewayBinding JSON' - ) + raise ValueError('Required property \'created_at\' not present in PrivatePathServiceGatewayEndpointGatewayBinding JSON') if (expiration_at := _dict.get('expiration_at')) is not None: args['expiration_at'] = string_to_datetime(expiration_at) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError( - 'Required property \'href\' not present in PrivatePathServiceGatewayEndpointGatewayBinding JSON' - ) + raise ValueError('Required property \'href\' not present in PrivatePathServiceGatewayEndpointGatewayBinding JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError( - 'Required property \'id\' not present in PrivatePathServiceGatewayEndpointGatewayBinding JSON' - ) + raise ValueError('Required property \'id\' not present in PrivatePathServiceGatewayEndpointGatewayBinding 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 PrivatePathServiceGatewayEndpointGatewayBinding JSON' - ) + raise ValueError('Required property \'lifecycle_state\' not present in PrivatePathServiceGatewayEndpointGatewayBinding 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 PrivatePathServiceGatewayEndpointGatewayBinding JSON' - ) + raise ValueError('Required property \'resource_type\' not present in PrivatePathServiceGatewayEndpointGatewayBinding JSON') if (status := _dict.get('status')) is not None: args['status'] = status else: - raise ValueError( - 'Required property \'status\' not present in PrivatePathServiceGatewayEndpointGatewayBinding JSON' - ) + raise ValueError('Required property \'status\' not present in PrivatePathServiceGatewayEndpointGatewayBinding JSON') return cls(**args) @classmethod @@ -73614,6 +74188,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -73621,6 +74196,7 @@ class ResourceTypeEnum(str, Enum): PRIVATE_PATH_SERVICE_GATEWAY_ENDPOINT_GATEWAY_BINDING = 'private_path_service_gateway_endpoint_gateway_binding' + class StatusEnum(str, Enum): """ The status of the endpoint gateway binding: @@ -73643,6 +74219,7 @@ class StatusEnum(str, Enum): PERMITTED = 'permitted' + class PrivatePathServiceGatewayEndpointGatewayBindingCollection: """ PrivatePathServiceGatewayEndpointGatewayBindingCollection. @@ -73693,33 +74270,23 @@ def from_dict(cls, _dict: Dict) -> 'PrivatePathServiceGatewayEndpointGatewayBind """Initialize a PrivatePathServiceGatewayEndpointGatewayBindingCollection object from a json dictionary.""" args = {} if (endpoint_gateway_bindings := _dict.get('endpoint_gateway_bindings')) is not None: - args['endpoint_gateway_bindings'] = [ - PrivatePathServiceGatewayEndpointGatewayBinding.from_dict(v) for v in endpoint_gateway_bindings - ] + args['endpoint_gateway_bindings'] = [PrivatePathServiceGatewayEndpointGatewayBinding.from_dict(v) for v in endpoint_gateway_bindings] else: - raise ValueError( - 'Required property \'endpoint_gateway_bindings\' not present in PrivatePathServiceGatewayEndpointGatewayBindingCollection JSON' - ) + raise ValueError('Required property \'endpoint_gateway_bindings\' not present in PrivatePathServiceGatewayEndpointGatewayBindingCollection JSON') if (first := _dict.get('first')) is not None: args['first'] = PageLink.from_dict(first) else: - raise ValueError( - 'Required property \'first\' not present in PrivatePathServiceGatewayEndpointGatewayBindingCollection JSON' - ) + raise ValueError('Required property \'first\' not present in PrivatePathServiceGatewayEndpointGatewayBindingCollection JSON') if (limit := _dict.get('limit')) is not None: args['limit'] = limit else: - raise ValueError( - 'Required property \'limit\' not present in PrivatePathServiceGatewayEndpointGatewayBindingCollection JSON' - ) + raise ValueError('Required property \'limit\' not present in PrivatePathServiceGatewayEndpointGatewayBindingCollection JSON') if (next := _dict.get('next')) is not None: args['next'] = PageLink.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 PrivatePathServiceGatewayEndpointGatewayBindingCollection JSON' - ) + raise ValueError('Required property \'total_count\' not present in PrivatePathServiceGatewayEndpointGatewayBindingCollection JSON') return cls(**args) @classmethod @@ -73895,6 +74462,7 @@ class DefaultAccessPolicyEnum(str, Enum): REVIEW = 'review' + class PrivatePathServiceGatewayRemote: """ If present, this property indicates that the resource associated with this reference @@ -74161,6 +74729,7 @@ class ResourceTypeEnum(str, Enum): PUBLIC_GATEWAY = 'public_gateway' + class StatusEnum(str, Enum): """ The status of this public gateway. @@ -74172,6 +74741,7 @@ class StatusEnum(str, Enum): PENDING = 'pending' + class PublicGatewayCollection: """ PublicGatewayCollection. @@ -74302,12 +74872,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'PublicGatewayFloatingIPPrototypeFloatingIPIdentity', - 'PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext', - ] - ) + ", ".join(['PublicGatewayFloatingIPPrototypeFloatingIPIdentity', 'PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext']) ) raise Exception(msg) @@ -74443,13 +75008,7 @@ def __init__( """ 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) @@ -74638,6 +75197,7 @@ class ResourceTypeEnum(str, Enum): PUBLIC_GATEWAY = 'public_gateway' + class Region: """ Region. @@ -74744,6 +75304,7 @@ class StatusEnum(str, Enum): UNAVAILABLE = 'unavailable' + class RegionCollection: """ RegionCollection. @@ -74902,6 +75463,7 @@ class Reservation: Reservation. :param str affinity_policy: The affinity policy to use for this reservation: + - `automatic`: The reservation will be automatically selected - `restricted`: The reservation must be manually requested The enumerated values for this property may [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the @@ -74919,9 +75481,11 @@ class Reservation: :param str lifecycle_state: The lifecycle state of this reservation. :param str name: The name for this reservation. The name is unique across all reservations in the region. - :param ReservationProfile profile: The - [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) for this - reservation. + :param ReservationProfile profile: The [instance + profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) or + [bare metal server + profile](https://cloud.ibm.com/docs/vpc?topic=vpc-bare-metal-servers-profile) + for this reservation. :param ResourceGroupReference resource_group: The resource group for this reservation. :param str resource_type: The resource type. @@ -74958,6 +75522,7 @@ def __init__( :param str affinity_policy: The affinity policy to use for this reservation: + - `automatic`: The reservation will be automatically selected - `restricted`: The reservation must be manually requested The enumerated values for this property may [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the @@ -74970,9 +75535,11 @@ def __init__( :param str lifecycle_state: The lifecycle state of this reservation. :param str name: The name for this reservation. The name is unique across all reservations in the region. - :param ReservationProfile profile: The - [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) for this - reservation. + :param ReservationProfile profile: The [instance + profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) or + [bare metal server + profile](https://cloud.ibm.com/docs/vpc?topic=vpc-bare-metal-servers-profile) + for this reservation. :param ResourceGroupReference resource_group: The resource group for this reservation. :param str resource_type: The resource type. @@ -75043,7 +75610,7 @@ def from_dict(cls, _dict: Dict) -> 'Reservation': else: raise ValueError('Required property \'name\' not present in Reservation JSON') if (profile := _dict.get('profile')) is not None: - args['profile'] = ReservationProfile.from_dict(profile) + args['profile'] = profile else: raise ValueError('Required property \'profile\' not present in Reservation JSON') if (resource_group := _dict.get('resource_group')) is not None: @@ -75150,14 +75717,17 @@ def __ne__(self, other: 'Reservation') -> bool: class AffinityPolicyEnum(str, Enum): """ The affinity policy to use for this reservation: + - `automatic`: The reservation will be automatically selected - `restricted`: The reservation must be manually requested The enumerated values for this property may [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. """ + AUTOMATIC = 'automatic' RESTRICTED = 'restricted' + class LifecycleStateEnum(str, Enum): """ The lifecycle state of this reservation. @@ -75171,6 +75741,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -75178,6 +75749,7 @@ class ResourceTypeEnum(str, Enum): RESERVATION = 'reservation' + class StatusEnum(str, Enum): """ The status of the reservation. @@ -75194,6 +75766,7 @@ class StatusEnum(str, Enum): INACTIVE = 'inactive' + class ReservationCapacity: """ The capacity configuration for this reservation @@ -75341,6 +75914,7 @@ class StatusEnum(str, Enum): UNALLOCATED = 'unallocated' + class ReservationCapacityPatch: """ The capacity reservation configuration to use. @@ -75699,6 +76273,7 @@ class ExpirationPolicyEnum(str, Enum): RENEW = 'renew' + class ReservationCommittedUsePatch: """ ReservationCommittedUsePatch. @@ -75797,6 +76372,7 @@ class ExpirationPolicyEnum(str, Enum): RENEW = 'renew' + class ReservationCommittedUsePrototype: """ ReservationCommittedUsePrototype. @@ -75893,6 +76469,7 @@ class ExpirationPolicyEnum(str, Enum): RENEW = 'renew' + class ReservationIdentity: """ Identifies a reservation by a unique property. @@ -75916,6 +76493,12 @@ class ReservationPatch: """ ReservationPatch. + :param str affinity_policy: (optional) The affinity policy to use for this + reservation: + - `automatic`: The reservation will be automatically selected + - `restricted`: The reservation must be manually requested + The affinity policy can only be changed for a reservation with a `status` of + `inactive`. :param ReservationCapacityPatch capacity: (optional) The capacity reservation configuration to use. The configuration can only be changed for reservations with a `status` of @@ -75924,14 +76507,17 @@ class ReservationPatch: configuration to use for this reservation. :param str name: (optional) The name for this reservation. The name must not be used by another reservation in the region. - :param ReservationProfilePatch profile: (optional) The - [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this - reservation. + :param ReservationProfilePatch profile: (optional) The [instance + profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) or + [bare metal server + profile](https://cloud.ibm.com/docs/vpc?topic=vpc-bare-metal-servers-profile) + to use for this reservation. """ def __init__( self, *, + affinity_policy: Optional[str] = None, capacity: Optional['ReservationCapacityPatch'] = None, committed_use: Optional['ReservationCommittedUsePatch'] = None, name: Optional[str] = None, @@ -75940,6 +76526,12 @@ def __init__( """ Initialize a ReservationPatch object. + :param str affinity_policy: (optional) The affinity policy to use for this + reservation: + - `automatic`: The reservation will be automatically selected + - `restricted`: The reservation must be manually requested + The affinity policy can only be changed for a reservation with a `status` + of `inactive`. :param ReservationCapacityPatch capacity: (optional) The capacity reservation configuration to use. The configuration can only be changed for reservations with a `status` of @@ -75948,11 +76540,13 @@ def __init__( use configuration to use for this reservation. :param str name: (optional) The name for this reservation. The name must not be used by another reservation in the region. - :param ReservationProfilePatch profile: (optional) The - [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for - this - reservation. + :param ReservationProfilePatch profile: (optional) The [instance + profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) or + [bare metal server + profile](https://cloud.ibm.com/docs/vpc?topic=vpc-bare-metal-servers-profile) + to use for this reservation. """ + self.affinity_policy = affinity_policy self.capacity = capacity self.committed_use = committed_use self.name = name @@ -75962,6 +76556,8 @@ def __init__( def from_dict(cls, _dict: Dict) -> 'ReservationPatch': """Initialize a ReservationPatch object from a json dictionary.""" args = {} + if (affinity_policy := _dict.get('affinity_policy')) is not None: + args['affinity_policy'] = affinity_policy if (capacity := _dict.get('capacity')) is not None: args['capacity'] = ReservationCapacityPatch.from_dict(capacity) if (committed_use := _dict.get('committed_use')) is not None: @@ -75980,6 +76576,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: + _dict['affinity_policy'] = self.affinity_policy if hasattr(self, 'capacity') and self.capacity is not None: if isinstance(self.capacity, dict): _dict['capacity'] = self.capacity @@ -76017,99 +76615,48 @@ def __ne__(self, other: 'ReservationPatch') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other + class AffinityPolicyEnum(str, Enum): + """ + The affinity policy to use for this reservation: + - `automatic`: The reservation will be automatically selected + - `restricted`: The reservation must be manually requested + The affinity policy can only be changed for a reservation with a `status` of + `inactive`. + """ + + AUTOMATIC = 'automatic' + RESTRICTED = 'restricted' + + class ReservationProfile: """ - The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) for this reservation. + The [instance profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) or + [bare metal server + profile](https://cloud.ibm.com/docs/vpc?topic=vpc-bare-metal-servers-profile) for this + reservation. - :param str href: The URL for this virtual server instance profile. - :param str name: The globally unique name for this virtual server instance - profile. - :param str resource_type: The resource type. """ def __init__( self, - href: str, - name: str, - resource_type: str, ) -> None: """ Initialize a ReservationProfile object. - :param str href: The URL for this virtual server instance profile. - :param str name: The globally unique name for this virtual server instance - profile. - :param str resource_type: The resource type. """ - self.href = href - self.name = name - self.resource_type = resource_type - - @classmethod - def from_dict(cls, _dict: Dict) -> 'ReservationProfile': - """Initialize a ReservationProfile 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 ReservationProfile JSON') - if (name := _dict.get('name')) is not None: - args['name'] = name - else: - 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') - return cls(**args) - - @classmethod - def _from_dict(cls, _dict): - """Initialize a ReservationProfile 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, '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 - 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 ReservationProfile object.""" - return json.dumps(self.to_dict(), indent=2) - - def __eq__(self, other: 'ReservationProfile') -> bool: - """Return `true` when self and other are equal, false otherwise.""" - if not isinstance(other, self.__class__): - return False - return self.__dict__ == other.__dict__ - - def __ne__(self, other: 'ReservationProfile') -> bool: - """Return `true` when self and other are not equal, false otherwise.""" - return not self == other - - class ResourceTypeEnum(str, Enum): - """ - The resource type. - """ - - INSTANCE_PROFILE = 'instance_profile' + msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( + ", ".join(['ReservationProfileInstanceProfileReference', 'ReservationProfileBareMetalServerProfileReference']) + ) + raise Exception(msg) class ReservationProfilePatch: """ - The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this - reservation. + The [instance profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) or + [bare metal server + profile](https://cloud.ibm.com/docs/vpc?topic=vpc-bare-metal-servers-profile) to use + for this reservation. :param str name: (optional) The globally unique name of the profile. :param str resource_type: (optional) The resource type of the profile. @@ -76177,13 +76724,17 @@ class ResourceTypeEnum(str, Enum): The resource type of the profile. """ + BARE_METAL_SERVER_PROFILE = 'bare_metal_server_profile' INSTANCE_PROFILE = 'instance_profile' + class ReservationProfilePrototype: """ - The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this - reservation. + The [instance profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) or + [bare metal server + profile](https://cloud.ibm.com/docs/vpc?topic=vpc-bare-metal-servers-profile) to use + for this reservation. :param str name: The globally unique name of the profile. :param str resource_type: The resource type of the profile. @@ -76254,9 +76805,11 @@ class ResourceTypeEnum(str, Enum): The resource type of the profile. """ + BARE_METAL_SERVER_PROFILE = 'bare_metal_server_profile' INSTANCE_PROFILE = 'instance_profile' + class ReservationReference: """ ReservationReference. @@ -76381,6 +76934,7 @@ class ResourceTypeEnum(str, Enum): RESERVATION = 'reservation' + class ReservationStatusReason: """ ReservationStatusReason. @@ -76478,6 +77032,7 @@ class CodeEnum(str, Enum): CANNOT_RENEW_UNSUPPORTED_PROFILE_TERM = 'cannot_renew_unsupported_profile_term' + class ReservedIP: """ ReservedIP. @@ -76672,6 +77227,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class OwnerEnum(str, Enum): """ The owner of the reserved IP. @@ -76683,6 +77239,7 @@ class OwnerEnum(str, Enum): PROVIDER = 'provider' USER = 'user' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -76691,6 +77248,7 @@ class ResourceTypeEnum(str, Enum): SUBNET_RESERVED_IP = 'subnet_reserved_ip' + class ReservedIPCollection: """ ReservedIPCollection. @@ -76857,29 +77415,21 @@ def from_dict(cls, _dict: Dict) -> 'ReservedIPCollectionBareMetalServerNetworkIn if (first := _dict.get('first')) is not None: args['first'] = PageLink.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'] = PageLink.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 @@ -76983,9 +77533,7 @@ def from_dict(cls, _dict: Dict) -> 'ReservedIPCollectionEndpointGatewayContext': if (first := _dict.get('first')) is not None: args['first'] = PageLink.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: @@ -76993,17 +77541,13 @@ def from_dict(cls, _dict: Dict) -> 'ReservedIPCollectionEndpointGatewayContext': 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'] = PageLink.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 @@ -77107,29 +77651,21 @@ def from_dict(cls, _dict: Dict) -> 'ReservedIPCollectionInstanceNetworkInterface if (first := _dict.get('first')) is not None: args['first'] = PageLink.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'] = PageLink.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 @@ -77233,29 +77769,21 @@ def from_dict(cls, _dict: Dict) -> 'ReservedIPCollectionVirtualNetworkInterfaceC if (first := _dict.get('first')) is not None: args['first'] = PageLink.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'] = PageLink.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 @@ -77517,6 +78045,7 @@ class ResourceTypeEnum(str, Enum): SUBNET_RESERVED_IP = 'subnet_reserved_ip' + class ReservedIPTarget: """ The target this reserved IP is bound to. @@ -77534,18 +78063,7 @@ def __init__( """ 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) @@ -77568,12 +78086,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'ReservedIPTargetPrototypeEndpointGatewayIdentity', - 'ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentity', - ] - ) + ", ".join(['ReservedIPTargetPrototypeEndpointGatewayIdentity', 'ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentity']) ) raise Exception(msg) @@ -77851,6 +78364,11 @@ def __init__( traffic from those ingress sources arriving in this zone will be subject to this route. + :param RouteCreator creator: (optional) If present, the resource that + created the route. Routes with this property present cannot + be directly deleted. All routes with an `origin` of `service` will have + this property set, + and future `origin` values may also have this property set. """ self.action = action self.advertise = advertise @@ -77936,11 +78454,11 @@ def to_dict(self) -> Dict: _dict['advertise'] = self.advertise if hasattr(self, 'created_at') and self.created_at is not None: _dict['created_at'] = datetime_to_string(self.created_at) - if hasattr(self, 'creator') and getattr(self, 'creator') is not None: - if isinstance(getattr(self, 'creator'), dict): - _dict['creator'] = getattr(self, 'creator') + if hasattr(self, 'creator') and self.creator is not None: + if isinstance(self.creator, dict): + _dict['creator'] = self.creator else: - _dict['creator'] = getattr(self, 'creator').to_dict() + _dict['creator'] = self.creator.to_dict() if hasattr(self, 'destination') and self.destination is not None: _dict['destination'] = self.destination if hasattr(self, 'href') and self.href is not None: @@ -78003,6 +78521,7 @@ class ActionEnum(str, Enum): DELIVER = 'deliver' DROP = 'drop' + class LifecycleStateEnum(str, Enum): """ The lifecycle state of the route. @@ -78016,6 +78535,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class OriginEnum(str, Enum): """ The origin of this route: @@ -78030,6 +78550,7 @@ class OriginEnum(str, Enum): USER = 'user' + class RouteCollection: """ RouteCollection. @@ -78688,6 +79209,7 @@ class ActionEnum(str, Enum): DROP = 'drop' + class RouteReference: """ RouteReference. @@ -79132,6 +79654,7 @@ class AdvertiseRoutesToEnum(str, Enum): DIRECT_LINK = 'direct_link' TRANSIT_GATEWAY = 'transit_gateway' + class LifecycleStateEnum(str, Enum): """ The lifecycle state of the routing table. @@ -79145,6 +79668,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -79153,6 +79677,7 @@ class ResourceTypeEnum(str, Enum): ROUTING_TABLE = 'routing_table' + class RoutingTableCollection: """ RoutingTableCollection. @@ -79538,6 +80063,7 @@ class AdvertiseRoutesToEnum(str, Enum): TRANSIT_GATEWAY = 'transit_gateway' + class RoutingTableReference: """ RoutingTableReference. @@ -79662,6 +80188,7 @@ class ResourceTypeEnum(str, Enum): ROUTING_TABLE = 'routing_table' + class SecurityGroup: """ SecurityGroup. @@ -80199,13 +80726,7 @@ 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) @@ -80216,13 +80737,7 @@ 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) @@ -80258,6 +80773,7 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' + class IpVersionEnum(str, Enum): """ The IP version to allow. The format of `local.address`, `remote.address`, @@ -80269,6 +80785,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class ProtocolEnum(str, Enum): """ The protocol to allow. @@ -80283,6 +80800,7 @@ class ProtocolEnum(str, Enum): UDP = 'udp' + class SecurityGroupRuleCollection: """ SecurityGroupRuleCollection. @@ -80596,6 +81114,7 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' + class IpVersionEnum(str, Enum): """ The IP version to allow. The format of `local.address`, `remote.address`, @@ -80608,6 +81127,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class SecurityGroupRulePrototype: """ SecurityGroupRulePrototype. @@ -80673,13 +81193,7 @@ 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) @@ -80691,6 +81205,7 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' + class IpVersionEnum(str, Enum): """ The IP version to allow. The format of `local.address`, `remote.address`, @@ -80702,6 +81217,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class ProtocolEnum(str, Enum): """ The protocol to allow. @@ -80713,6 +81229,7 @@ class ProtocolEnum(str, Enum): UDP = 'udp' + class SecurityGroupRuleRemote: """ The remote IP addresses or security groups from which this rule allows traffic (or to @@ -80729,13 +81246,7 @@ def __init__( """ 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) @@ -80757,13 +81268,7 @@ def __init__( """ 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) @@ -80787,13 +81292,7 @@ def __init__( """ 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) @@ -80932,16 +81431,7 @@ def __init__( """ 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) @@ -80967,7 +81457,8 @@ class 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. + (possibly in another account) with access to this file share's data and its + snapshots. :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. @@ -81033,11 +81524,21 @@ class Share: :param ResourceGroupReference resource_group: The resource group for this file share. :param str resource_type: The resource type. - :param int size: The size of the file share rounded up to the next gigabyte. + :param int size: The size of the file share (in gigabytes), excluding share + snapshots. The maximum size for a share may increase in the future. + :param int snapshot_count: The total number of snapshots for this share. + :param int snapshot_size: The total size (in gigabytes) of snapshots used for + this file share. :param ShareReference source_share: (optional) The source file share for this replica file share. This property will be present when the `replication_role` is `replica`. + :param ShareSourceSnapshot source_snapshot: (optional) The snapshot this share + was created from. + This property will be present when the share was created from a snapshot. + The resources supported by this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. :param List[str] user_tags: Tags for this resource. :param ZoneReference zone: The zone this file share will reside in. """ @@ -81065,6 +81566,8 @@ def __init__( resource_group: 'ResourceGroupReference', resource_type: str, size: int, + snapshot_count: int, + snapshot_size: int, user_tags: List[str], zone: 'ZoneReference', *, @@ -81075,6 +81578,7 @@ def __init__( replica_share: Optional['ShareReference'] = None, replication_cron_spec: Optional[str] = None, source_share: Optional['ShareReference'] = None, + source_snapshot: Optional['ShareSourceSnapshot'] = None, ) -> None: """ Initialize a Share object. @@ -81098,7 +81602,8 @@ def __init__( (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. + (possibly in another account) with access to this file share's data and its + snapshots. :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 @@ -81146,9 +81651,12 @@ def __init__( :param ResourceGroupReference resource_group: The resource group for this file share. :param str resource_type: The resource type. - :param int size: The size of the file share rounded up to the next - gigabyte. + :param int size: The size of the file share (in gigabytes), excluding share + snapshots. The maximum size for a share may increase in the future. + :param int snapshot_count: The total number of snapshots for this share. + :param int snapshot_size: The total size (in gigabytes) of snapshots used + for this file share. :param List[str] user_tags: Tags for this resource. :param ZoneReference zone: The zone this file share will reside in. :param EncryptionKeyReference encryption_key: (optional) The key used to @@ -81176,6 +81684,12 @@ def __init__( :param ShareReference source_share: (optional) The source file share for this replica file share. This property will be present when the `replication_role` is `replica`. + :param ShareSourceSnapshot source_snapshot: (optional) The snapshot this + share was created from. + This property will be present when the share was created from a snapshot. + The resources supported by this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. """ self.access_control_mode = access_control_mode self.accessor_binding_role = accessor_binding_role @@ -81204,7 +81718,10 @@ def __init__( self.resource_group = resource_group self.resource_type = resource_type self.size = size + self.snapshot_count = snapshot_count + self.snapshot_size = snapshot_size self.source_share = source_share + self.source_snapshot = source_snapshot self.user_tags = user_tags self.zone = zone @@ -81293,9 +81810,7 @@ def from_dict(cls, _dict: Dict) -> 'Share': 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 - ] + 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: @@ -81310,8 +81825,18 @@ def from_dict(cls, _dict: Dict) -> 'Share': args['size'] = size else: raise ValueError('Required property \'size\' not present in Share JSON') + if (snapshot_count := _dict.get('snapshot_count')) is not None: + args['snapshot_count'] = snapshot_count + else: + raise ValueError('Required property \'snapshot_count\' not present in Share JSON') + if (snapshot_size := _dict.get('snapshot_size')) is not None: + args['snapshot_size'] = snapshot_size + else: + raise ValueError('Required property \'snapshot_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 (source_snapshot := _dict.get('source_snapshot')) is not None: + args['source_snapshot'] = source_snapshot if (user_tags := _dict.get('user_tags')) is not None: args['user_tags'] = user_tags else: @@ -81429,11 +81954,20 @@ 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, 'snapshot_count') and self.snapshot_count is not None: + _dict['snapshot_count'] = self.snapshot_count + if hasattr(self, 'snapshot_size') and self.snapshot_size is not None: + _dict['snapshot_size'] = self.snapshot_size if hasattr(self, 'source_share') and self.source_share is not None: if isinstance(self.source_share, dict): _dict['source_share'] = self.source_share else: _dict['source_share'] = self.source_share.to_dict() + 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: + _dict['source_snapshot'] = self.source_snapshot.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: @@ -81477,6 +82011,7 @@ class AccessControlModeEnum(str, Enum): SECURITY_GROUP = 'security_group' VPC = 'vpc' + class AccessorBindingRoleEnum(str, Enum): """ The accessor binding role of this file share: @@ -81491,6 +82026,7 @@ class AccessorBindingRoleEnum(str, Enum): NONE = 'none' ORIGIN = 'origin' + class AllowedTransitEncryptionModesEnum(str, Enum): """ An allowed transit encryption mode for this share. @@ -81504,6 +82040,7 @@ class AllowedTransitEncryptionModesEnum(str, Enum): NONE = 'none' USER_MANAGED = 'user_managed' + class EncryptionEnum(str, Enum): """ The type of encryption used for this file share. @@ -81512,6 +82049,7 @@ class EncryptionEnum(str, Enum): PROVIDER_MANAGED = 'provider_managed' USER_MANAGED = 'user_managed' + class LifecycleStateEnum(str, Enum): """ The lifecycle state of the file share. @@ -81525,6 +82063,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ReplicationRoleEnum(str, Enum): """ The replication role of the file share: @@ -81540,6 +82079,7 @@ class ReplicationRoleEnum(str, Enum): REPLICA = 'replica' SOURCE = 'source' + class ReplicationStatusEnum(str, Enum): """ The replication status of the file share: @@ -81563,6 +82103,7 @@ class ReplicationStatusEnum(str, Enum): NONE = 'none' SPLIT_PENDING = 'split_pending' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -81571,15 +82112,13 @@ 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. @@ -81603,9 +82142,6 @@ def __init__( :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. @@ -81707,6 +82243,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -81715,11 +82252,10 @@ class ResourceTypeEnum(str, Enum): 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. """ @@ -81731,12 +82267,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'ShareAccessorBindingAccessorShareReference', - 'ShareAccessorBindingAccessorWatsonxMachineLearningReference', - ] - ) + ", ".join(['ShareAccessorBindingAccessorShareReference', 'ShareAccessorBindingAccessorWatsonxMachineLearningReference']) ) raise Exception(msg) @@ -81791,9 +82322,7 @@ def from_dict(cls, _dict: Dict) -> 'ShareAccessorBindingCollection': 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' - ) + raise ValueError('Required property \'accessor_bindings\' not present in ShareAccessorBindingCollection JSON') if (first := _dict.get('first')) is not None: args['first'] = PageLink.from_dict(first) else: @@ -81947,6 +82476,7 @@ class ResourceTypeEnum(str, Enum): SHARE_ACCESSOR_BINDING = 'share_accessor_binding' + class ShareCollection: """ ShareCollection. @@ -82281,6 +82811,7 @@ class StatusEnum(str, Enum): RUNNING = 'running' SUCCEEDED = 'succeeded' + class TypeEnum(str, Enum): """ The type of the file share job: @@ -82297,6 +82828,7 @@ class TypeEnum(str, Enum): REPLICATION_SPLIT = 'replication_split' + class ShareJobStatusReason: """ ShareJobStatusReason. @@ -82395,6 +82927,7 @@ class CodeEnum(str, Enum): CANNOT_REACH_SOURCE_SHARE = 'cannot_reach_source_share' + class ShareLatestSync: """ Information about the latest synchronization for this file share. @@ -82595,6 +83128,7 @@ class CodeEnum(str, Enum): RESOURCE_SUSPENDED_BY_PROVIDER = 'resource_suspended_by_provider' + class ShareMountTarget: """ ShareMountTarget. @@ -82786,9 +83320,7 @@ def from_dict(cls, _dict: Dict) -> 'ShareMountTarget': 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 - ) + 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: @@ -82877,6 +83409,7 @@ class AccessControlModeEnum(str, Enum): SECURITY_GROUP = 'security_group' VPC = 'vpc' + class LifecycleStateEnum(str, Enum): """ The lifecycle state of the mount target. @@ -82890,6 +83423,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -82897,6 +83431,7 @@ class ResourceTypeEnum(str, Enum): SHARE_MOUNT_TARGET = 'share_mount_target' + class TransitEncryptionEnum(str, Enum): """ The transit encryption mode for this share mount target: @@ -82911,6 +83446,7 @@ class TransitEncryptionEnum(str, Enum): USER_MANAGED = 'user_managed' + class ShareMountTargetCollection: """ ShareMountTargetCollection. @@ -83127,12 +83663,7 @@ def __init__( `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) @@ -83151,6 +83682,7 @@ class TransitEncryptionEnum(str, Enum): USER_MANAGED = 'user_managed' + class ShareMountTargetReference: """ ShareMountTargetReference. @@ -83265,6 +83797,7 @@ class ResourceTypeEnum(str, Enum): SHARE_MOUNT_TARGET = 'share_mount_target' + class ShareMountTargetVirtualNetworkInterfacePrototype: """ ShareMountTargetVirtualNetworkInterfacePrototype. @@ -83279,12 +83812,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext', - 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentity', - ] - ) + ", ".join(['ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext', 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentity']) ) raise Exception(msg) @@ -83319,9 +83847,9 @@ class SharePatch: share replication schedule. Replication of a share can be scheduled to occur at most once every 15 minutes. For this property to be changed, the share `replication_role` must be `replica`. - :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. + :param int size: (optional) The size of the file share (in gigabytes), excluding + share snapshots. 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` - The share `replication_role` must not be `replica` @@ -83374,9 +83902,10 @@ def __init__( minutes. For this property to be changed, the share `replication_role` must be `replica`. - :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. + :param int size: (optional) The size of the file share (in gigabytes), + excluding share snapshots. 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` - The share `replication_role` must not be `replica` @@ -83476,6 +84005,7 @@ class AccessControlModeEnum(str, Enum): SECURITY_GROUP = 'security_group' VPC = 'vpc' + class AllowedTransitEncryptionModesEnum(str, Enum): """ An allowed transit encryption mode for this share. @@ -83490,6 +84020,7 @@ class AllowedTransitEncryptionModesEnum(str, Enum): USER_MANAGED = 'user_managed' + class ShareProfile: """ ShareProfile. @@ -83624,6 +84155,7 @@ class FamilyEnum(str, Enum): DEFINED_PERFORMANCE = 'defined_performance' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -83632,6 +84164,7 @@ class ResourceTypeEnum(str, Enum): SHARE_PROFILE = 'share_profile' + class ShareProfileCapacity: """ ShareProfileCapacity. @@ -83646,14 +84179,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'ShareProfileCapacityFixed', - 'ShareProfileCapacityEnum', - 'ShareProfileCapacityRange', - 'ShareProfileCapacityDependentRange', - ] - ) + ", ".join(['ShareProfileCapacityFixed', 'ShareProfileCapacityEnum', 'ShareProfileCapacityRange', 'ShareProfileCapacityDependentRange']) ) raise Exception(msg) @@ -83788,14 +84314,7 @@ def __init__( """ 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) @@ -83905,6 +84424,7 @@ class ResourceTypeEnum(str, Enum): SHARE_PROFILE = 'share_profile' + class SharePrototype: """ SharePrototype. @@ -83961,9 +84481,7 @@ 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', 'SharePrototypeShareByOriginShare'] - ) + ", ".join(['SharePrototypeShareBySize', 'SharePrototypeShareBySourceShare', 'SharePrototypeShareByOriginShare', 'SharePrototypeShareBySourceSnapshot']) ) raise Exception(msg) @@ -83981,6 +84499,7 @@ class AllowedTransitEncryptionModesEnum(str, Enum): USER_MANAGED = 'user_managed' + class SharePrototypeShareContext: """ Configuration for a replica file share to create and associate with this file share. @@ -84105,9 +84624,7 @@ def from_dict(cls, _dict: Dict) -> 'SharePrototypeShareContext': 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: @@ -84193,6 +84710,7 @@ class AllowedTransitEncryptionModesEnum(str, Enum): USER_MANAGED = 'user_managed' + class ShareReference: """ ShareReference. @@ -84332,6 +84850,7 @@ class ResourceTypeEnum(str, Enum): SHARE = 'share' + class ShareRemote: """ If present, this property indicates that the resource associated with this reference @@ -84511,6 +85030,796 @@ class CodeEnum(str, Enum): CANNOT_REACH_SOURCE_SHARE = 'cannot_reach_source_share' + +class ShareSnapshot: + """ + ShareSnapshot. + + :param BackupPolicyPlanReference backup_policy_plan: (optional) If present, the + backup policy plan which created this share snapshot. + :param datetime captured_at: (optional) The date and time the data capture for + this share snapshot was completed. + If absent, this snapshot's data has not yet been captured. + :param datetime created_at: The date and time that the share snapshot was + created. + :param str crn: The CRN for this share snapshot. + :param str fingerprint: The fingerprint for this share snapshot. Only snapshots + with identical data will have the same fingerprint. This snapshot will also be + available as a subdirectory named identically to this fingerprint in the share's + `.snapshot` directory. + :param str href: The URL for this share snapshot. + :param str id: The unique identifier for this share snapshot. + :param List[ShareSnapshotLifecycleReason] lifecycle_reasons: The reasons for the + current `lifecycle_state` (if any). + :param str lifecycle_state: The lifecycle state of this share snapshot + - `pending`: The share snapshot is being provisioned and is not yet usable. A + snapshot on a replica share will remain `pending` until the next replication + sync + completes. + - `deleting`: The share snapshot is being deleted. + - `failed`: The share snapshot is irrecoverably unusable. + - `stable`: The share snapshot is stable and ready for use. + - `updating`: The share snapshot is being updated. + - `suspended`: The share snapshot is not currently usable (see + `lifecycle_reasons`). + :param int minimum_size: The minimum size of a share created from this snapshot. + When a snapshot is created, this will be set to the size of the `source_share`. + :param str name: The name for this share snapshot. The name is unique across all + snapshots for the file share. + :param ResourceGroupReference resource_group: The resource group for this share + snapshot. + :param str resource_type: The resource type. + :param str status: The status of the share snapshot: + - `available`: The share snapshot is available for use. + - `failed`: The share snapshot is irrecoverably unusable. + - `pending`: The share snapshot is being provisioned and is not yet usable. A + snapshot on a replica share will remain `pending` until the next replication + sync + completes. + - `unusable`: The share snapshot is not currently usable (see `status_reasons`) + The enumerated values for this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. + :param List[ShareSnapshotStatusReason] status_reasons: The reasons for the + current status (if any). + :param List[str] user_tags: The [user + tags](https://cloud.ibm.com/apidocs/tagging#types-of-tags) associated with this + share snapshot. + :param ZoneReference zone: The zone this share snapshot resides in. + """ + + def __init__( + self, + created_at: datetime, + crn: str, + fingerprint: str, + href: str, + id: str, + lifecycle_reasons: List['ShareSnapshotLifecycleReason'], + lifecycle_state: str, + minimum_size: int, + name: str, + resource_group: 'ResourceGroupReference', + resource_type: str, + status: str, + status_reasons: List['ShareSnapshotStatusReason'], + user_tags: List[str], + zone: 'ZoneReference', + *, + backup_policy_plan: Optional['BackupPolicyPlanReference'] = None, + captured_at: Optional[datetime] = None, + ) -> None: + """ + Initialize a ShareSnapshot object. + + :param datetime created_at: The date and time that the share snapshot was + created. + :param str crn: The CRN for this share snapshot. + :param str fingerprint: The fingerprint for this share snapshot. Only + snapshots with identical data will have the same fingerprint. This snapshot + will also be available as a subdirectory named identically to this + fingerprint in the share's `.snapshot` directory. + :param str href: The URL for this share snapshot. + :param str id: The unique identifier for this share snapshot. + :param List[ShareSnapshotLifecycleReason] lifecycle_reasons: The reasons + for the current `lifecycle_state` (if any). + :param str lifecycle_state: The lifecycle state of this share snapshot + - `pending`: The share snapshot is being provisioned and is not yet usable. + A + snapshot on a replica share will remain `pending` until the next + replication sync + completes. + - `deleting`: The share snapshot is being deleted. + - `failed`: The share snapshot is irrecoverably unusable. + - `stable`: The share snapshot is stable and ready for use. + - `updating`: The share snapshot is being updated. + - `suspended`: The share snapshot is not currently usable (see + `lifecycle_reasons`). + :param int minimum_size: The minimum size of a share created from this + snapshot. When a snapshot is created, this will be set to the size of the + `source_share`. + :param str name: The name for this share snapshot. The name is unique + across all snapshots for the file share. + :param ResourceGroupReference resource_group: The resource group for this + share snapshot. + :param str resource_type: The resource type. + :param str status: The status of the share snapshot: + - `available`: The share snapshot is available for use. + - `failed`: The share snapshot is irrecoverably unusable. + - `pending`: The share snapshot is being provisioned and is not yet usable. + A + snapshot on a replica share will remain `pending` until the next + replication sync + completes. + - `unusable`: The share snapshot is not currently usable (see + `status_reasons`) + The enumerated values for this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. + :param List[ShareSnapshotStatusReason] status_reasons: The reasons for the + current status (if any). + :param List[str] user_tags: The [user + tags](https://cloud.ibm.com/apidocs/tagging#types-of-tags) associated with + this share snapshot. + :param ZoneReference zone: The zone this share snapshot resides in. + :param BackupPolicyPlanReference backup_policy_plan: (optional) If present, + the backup policy plan which created this share snapshot. + :param datetime captured_at: (optional) The date and time the data capture + for this share snapshot was completed. + If absent, this snapshot's data has not yet been captured. + """ + self.backup_policy_plan = backup_policy_plan + self.captured_at = captured_at + self.created_at = created_at + self.crn = crn + self.fingerprint = fingerprint + self.href = href + self.id = id + self.lifecycle_reasons = lifecycle_reasons + self.lifecycle_state = lifecycle_state + self.minimum_size = minimum_size + self.name = name + self.resource_group = resource_group + self.resource_type = resource_type + self.status = status + self.status_reasons = status_reasons + self.user_tags = user_tags + self.zone = zone + + @classmethod + def from_dict(cls, _dict: Dict) -> 'ShareSnapshot': + """Initialize a ShareSnapshot 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) + if (captured_at := _dict.get('captured_at')) is not None: + args['captured_at'] = string_to_datetime(captured_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 ShareSnapshot JSON') + if (crn := _dict.get('crn')) is not None: + args['crn'] = crn + else: + raise ValueError('Required property \'crn\' not present in ShareSnapshot JSON') + if (fingerprint := _dict.get('fingerprint')) is not None: + args['fingerprint'] = fingerprint + else: + raise ValueError('Required property \'fingerprint\' not present in ShareSnapshot JSON') + if (href := _dict.get('href')) is not None: + args['href'] = href + else: + raise ValueError('Required property \'href\' not present in ShareSnapshot JSON') + if (id := _dict.get('id')) is not None: + args['id'] = id + else: + raise ValueError('Required property \'id\' not present in ShareSnapshot JSON') + if (lifecycle_reasons := _dict.get('lifecycle_reasons')) is not None: + args['lifecycle_reasons'] = [ShareSnapshotLifecycleReason.from_dict(v) for v in lifecycle_reasons] + else: + raise ValueError('Required property \'lifecycle_reasons\' not present in ShareSnapshot 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 ShareSnapshot JSON') + if (minimum_size := _dict.get('minimum_size')) is not None: + args['minimum_size'] = minimum_size + else: + raise ValueError('Required property \'minimum_size\' not present in ShareSnapshot JSON') + if (name := _dict.get('name')) is not None: + args['name'] = name + else: + raise ValueError('Required property \'name\' not present in ShareSnapshot JSON') + if (resource_group := _dict.get('resource_group')) is not None: + args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + else: + raise ValueError('Required property \'resource_group\' not present in ShareSnapshot 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 ShareSnapshot JSON') + if (status := _dict.get('status')) is not None: + args['status'] = status + else: + raise ValueError('Required property \'status\' not present in ShareSnapshot JSON') + if (status_reasons := _dict.get('status_reasons')) is not None: + args['status_reasons'] = [ShareSnapshotStatusReason.from_dict(v) for v in status_reasons] + else: + raise ValueError('Required property \'status_reasons\' not present in ShareSnapshot 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 ShareSnapshot JSON') + if (zone := _dict.get('zone')) is not None: + args['zone'] = ZoneReference.from_dict(zone) + else: + raise ValueError('Required property \'zone\' not present in ShareSnapshot JSON') + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a ShareSnapshot 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, '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: + _dict['backup_policy_plan'] = self.backup_policy_plan.to_dict() + if hasattr(self, 'captured_at') and self.captured_at is not None: + _dict['captured_at'] = datetime_to_string(self.captured_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, 'crn') and self.crn is not None: + _dict['crn'] = self.crn + if hasattr(self, 'fingerprint') and self.fingerprint is not None: + _dict['fingerprint'] = self.fingerprint + 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: + 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, 'minimum_size') and self.minimum_size is not None: + _dict['minimum_size'] = self.minimum_size + 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: + if isinstance(self.resource_group, dict): + _dict['resource_group'] = self.resource_group + else: + _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, 'status') and self.status is not None: + _dict['status'] = self.status + if hasattr(self, 'status_reasons') and self.status_reasons is not None: + status_reasons_list = [] + for v in self.status_reasons: + if isinstance(v, dict): + status_reasons_list.append(v) + else: + status_reasons_list.append(v.to_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, '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): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this ShareSnapshot object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'ShareSnapshot') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'ShareSnapshot') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + class LifecycleStateEnum(str, Enum): + """ + The lifecycle state of this share snapshot + - `pending`: The share snapshot is being provisioned and is not yet usable. A + snapshot on a replica share will remain `pending` until the next replication + sync + completes. + - `deleting`: The share snapshot is being deleted. + - `failed`: The share snapshot is irrecoverably unusable. + - `stable`: The share snapshot is stable and ready for use. + - `updating`: The share snapshot is being updated. + - `suspended`: The share snapshot is not currently usable (see + `lifecycle_reasons`). + """ + + DELETING = 'deleting' + FAILED = 'failed' + PENDING = 'pending' + STABLE = 'stable' + SUSPENDED = 'suspended' + UPDATING = 'updating' + WAITING = 'waiting' + + + class ResourceTypeEnum(str, Enum): + """ + The resource type. + """ + + SHARE_SNAPSHOT = 'share_snapshot' + + + class StatusEnum(str, Enum): + """ + The status of the share snapshot: + - `available`: The share snapshot is available for use. + - `failed`: The share snapshot is irrecoverably unusable. + - `pending`: The share snapshot is being provisioned and is not yet usable. A + snapshot on a replica share will remain `pending` until the next replication + sync + completes. + - `unusable`: The share snapshot is not currently usable (see `status_reasons`) + The enumerated values for this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. + """ + + AVAILABLE = 'available' + FAILED = 'failed' + PENDING = 'pending' + UNUSABLE = 'unusable' + + + +class ShareSnapshotCollection: + """ + ShareSnapshotCollection. + + :param PageLink 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 PageLink next: (optional) A link to the next page of resources. This + property is present for all pages + except the last page. + :param List[ShareSnapshot] snapshots: (optional) A page of share snapshots. + :param int total_count: The total number of resources across all pages. + """ + + def __init__( + self, + first: 'PageLink', + limit: int, + total_count: int, + *, + next: Optional['PageLink'] = None, + snapshots: Optional[List['ShareSnapshot']] = None, + ) -> None: + """ + Initialize a ShareSnapshotCollection object. + + :param PageLink 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 PageLink next: (optional) A link to the next page of resources. This + property is present for all pages + except the last page. + :param List[ShareSnapshot] snapshots: (optional) A page of share snapshots. + """ + self.first = first + self.limit = limit + self.next = next + self.snapshots = snapshots + self.total_count = total_count + + @classmethod + def from_dict(cls, _dict: Dict) -> 'ShareSnapshotCollection': + """Initialize a ShareSnapshotCollection object from a json dictionary.""" + args = {} + if (first := _dict.get('first')) is not None: + args['first'] = PageLink.from_dict(first) + else: + raise ValueError('Required property \'first\' not present in ShareSnapshotCollection JSON') + if (limit := _dict.get('limit')) is not None: + args['limit'] = limit + else: + raise ValueError('Required property \'limit\' not present in ShareSnapshotCollection JSON') + if (next := _dict.get('next')) is not None: + args['next'] = PageLink.from_dict(next) + if (snapshots := _dict.get('snapshots')) is not None: + args['snapshots'] = [ShareSnapshot.from_dict(v) for v in snapshots] + 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 ShareSnapshotCollection JSON') + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a ShareSnapshotCollection 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, '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, 'snapshots') and self.snapshots is not None: + snapshots_list = [] + for v in self.snapshots: + if isinstance(v, dict): + snapshots_list.append(v) + else: + snapshots_list.append(v.to_dict()) + _dict['snapshots'] = snapshots_list + 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 ShareSnapshotCollection object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'ShareSnapshotCollection') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'ShareSnapshotCollection') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + +class ShareSnapshotLifecycleReason: + """ + ShareSnapshotLifecycleReason. + + :param str code: A reason code for this lifecycle state: + - `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 ShareSnapshotLifecycleReason object. + + :param str code: A reason code for this lifecycle state: + - `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) -> 'ShareSnapshotLifecycleReason': + """Initialize a ShareSnapshotLifecycleReason 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 ShareSnapshotLifecycleReason JSON') + if (message := _dict.get('message')) is not None: + args['message'] = message + else: + raise ValueError('Required property \'message\' not present in ShareSnapshotLifecycleReason 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 ShareSnapshotLifecycleReason 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 ShareSnapshotLifecycleReason object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'ShareSnapshotLifecycleReason') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'ShareSnapshotLifecycleReason') -> 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: + - `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' + RESOURCE_SUSPENDED_BY_PROVIDER = 'resource_suspended_by_provider' + + + +class ShareSnapshotPatch: + """ + ShareSnapshotPatch. + + :param List[str] user_tags: (optional) The [user + tags](https://cloud.ibm.com/apidocs/tagging#types-of-tags) associated with this + share snapshot. + """ + + def __init__( + self, + *, + user_tags: Optional[List[str]] = None, + ) -> None: + """ + Initialize a ShareSnapshotPatch object. + + :param List[str] user_tags: (optional) The [user + tags](https://cloud.ibm.com/apidocs/tagging#types-of-tags) associated with + this share snapshot. + """ + self.user_tags = user_tags + + @classmethod + def from_dict(cls, _dict: Dict) -> 'ShareSnapshotPatch': + """Initialize a ShareSnapshotPatch object from a json dictionary.""" + args = {} + if (user_tags := _dict.get('user_tags')) is not None: + args['user_tags'] = user_tags + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a ShareSnapshotPatch 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, 'user_tags') and self.user_tags is not None: + _dict['user_tags'] = self.user_tags + 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 ShareSnapshotPatch object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'ShareSnapshotPatch') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'ShareSnapshotPatch') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + +class ShareSnapshotStatusReason: + """ + ShareSnapshotStatusReason. + + :param str code: A reason code for the status: + - `encryption_key_deleted`: Share snapshot is unusable because its + `encryption_key` was deleted + - `internal_error`: Internal error (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 status reason. + :param str more_info: (optional) Link to documentation about this status reason. + """ + + def __init__( + self, + code: str, + message: str, + *, + more_info: Optional[str] = None, + ) -> None: + """ + Initialize a ShareSnapshotStatusReason object. + + :param str code: A reason code for the status: + - `encryption_key_deleted`: Share snapshot is unusable because its + `encryption_key` was deleted + - `internal_error`: Internal error (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 status reason. + :param str more_info: (optional) Link to documentation about this status + reason. + """ + self.code = code + self.message = message + self.more_info = more_info + + @classmethod + def from_dict(cls, _dict: Dict) -> 'ShareSnapshotStatusReason': + """Initialize a ShareSnapshotStatusReason 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 ShareSnapshotStatusReason JSON') + if (message := _dict.get('message')) is not None: + args['message'] = message + else: + raise ValueError('Required property \'message\' not present in ShareSnapshotStatusReason 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 ShareSnapshotStatusReason 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 ShareSnapshotStatusReason object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'ShareSnapshotStatusReason') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'ShareSnapshotStatusReason') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + class CodeEnum(str, Enum): + """ + A reason code for the status: + - `encryption_key_deleted`: Share snapshot is unusable because its + `encryption_key` was deleted + - `internal_error`: Internal error (contact IBM support) + The enumerated values for this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. + """ + + ENCRYPTION_KEY_DELETED = 'encryption_key_deleted' + + + +class ShareSourceSnapshot: + """ + ShareSourceSnapshot. + + """ + + def __init__( + self, + ) -> None: + """ + Initialize a ShareSourceSnapshot object. + + """ + msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( + ", ".join(['ShareSourceSnapshotShareSnapshotReference']) + ) + raise Exception(msg) + + +class ShareSourceSnapshotPrototype: + """ + ShareSourceSnapshotPrototype. + + """ + + def __init__( + self, + ) -> None: + """ + Initialize a ShareSourceSnapshotPrototype object. + + """ + msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( + ", ".join(['ShareSourceSnapshotPrototypeShareSnapshotIdentity']) + ) + raise Exception(msg) + + class Snapshot: """ Snapshot. @@ -84927,6 +86236,7 @@ class EncryptionEnum(str, Enum): PROVIDER_MANAGED = 'provider_managed' USER_MANAGED = 'user_managed' + class LifecycleStateEnum(str, Enum): """ The lifecycle state of this snapshot. @@ -84940,6 +86250,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -84948,6 +86259,7 @@ class ResourceTypeEnum(str, Enum): SNAPSHOT = 'snapshot' + class SnapshotCatalogOffering: """ SnapshotCatalogOffering. @@ -85467,9 +86779,7 @@ def from_dict(cls, _dict: Dict) -> 'SnapshotConsistencyGroup': 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: @@ -85581,6 +86891,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -85589,6 +86900,7 @@ class ResourceTypeEnum(str, Enum): SNAPSHOT_CONSISTENCY_GROUP = 'snapshot_consistency_group' + class SnapshotConsistencyGroupCollection: """ SnapshotConsistencyGroupCollection. @@ -85647,13 +86959,9 @@ def from_dict(cls, _dict: Dict) -> 'SnapshotConsistencyGroupCollection': if (next := _dict.get('next')) is not None: args['next'] = PageLink.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 - ] + 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' - ) + 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: @@ -85897,9 +87205,7 @@ def from_dict(cls, _dict: Dict) -> 'SnapshotConsistencyGroupReference': 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 @@ -85953,6 +87259,7 @@ class ResourceTypeEnum(str, Enum): SNAPSHOT_CONSISTENCY_GROUP = 'snapshot_consistency_group' + class SnapshotCopiesItem: """ SnapshotCopiesItem. @@ -86090,6 +87397,7 @@ class ResourceTypeEnum(str, Enum): SNAPSHOT = 'snapshot' + class SnapshotIdentity: """ Identifies a snapshot by a unique property. @@ -86274,9 +87582,7 @@ 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) @@ -86458,6 +87764,7 @@ class ResourceTypeEnum(str, Enum): SNAPSHOT = 'snapshot' + class SnapshotRemote: """ If present, this property indicates that the resource associated with this reference @@ -86678,6 +87985,7 @@ class ResourceTypeEnum(str, Enum): SNAPSHOT = 'snapshot' + class Subnet: """ Subnet. @@ -86947,6 +88255,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -86954,6 +88263,7 @@ class ResourceTypeEnum(str, Enum): SUBNET = 'subnet' + class StatusEnum(str, Enum): """ The status of the subnet. @@ -86968,6 +88278,7 @@ class StatusEnum(str, Enum): PENDING = 'pending' + class SubnetCollection: """ SubnetCollection. @@ -87281,6 +88592,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class SubnetPublicGatewayPatch: """ The public gateway to use for internet-bound traffic for this subnet. @@ -87295,13 +88607,7 @@ def __init__( """ 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) @@ -87430,6 +88736,7 @@ class ResourceTypeEnum(str, Enum): SUBNET = 'subnet' + class TrustedProfileIdentity: """ Identifies a trusted profile by a unique property. @@ -87535,6 +88842,7 @@ class ResourceTypeEnum(str, Enum): TRUSTED_PROFILE = 'trusted_profile' + class VCPU: """ The VCPU configuration. @@ -87626,9 +88934,12 @@ class VPC: :param datetime created_at: The date and time that the VPC was created. :param str crn: The CRN for this VPC. :param List[VPCCSESourceIP] cse_source_ips: (optional) The CSE ([Cloud Service - Endpoint](https://cloud.ibm.com/docs/resources?topic=resources-service-endpoints)) - source IP addresses for the VPC. The VPC will have one CSE source IP address per - zone. + Endpoint](https://cloud.ibm.com/docs/account?topic=account-service-endpoints-overview)) + source IP addresses for the VPC. The VPC will have at least one CSE source IP + address per zone. + The maximum number of items for this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. :param NetworkACLReference default_network_acl: The default network ACL to use for subnets created in this VPC. :param RoutingTableReference default_routing_table: The default routing table to @@ -87729,9 +89040,12 @@ def __init__( future. :param List[VPCCSESourceIP] cse_source_ips: (optional) The CSE ([Cloud Service - Endpoint](https://cloud.ibm.com/docs/resources?topic=resources-service-endpoints)) - source IP addresses for the VPC. The VPC will have one CSE source IP - address per zone. + Endpoint](https://cloud.ibm.com/docs/account?topic=account-service-endpoints-overview)) + source IP addresses for the VPC. The VPC will have at least one CSE source + IP address per zone. + The maximum number of items for this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. """ self.classic_access = classic_access self.created_at = created_at @@ -87922,6 +89236,7 @@ class HealthStateEnum(str, Enum): INAPPLICABLE = 'inapplicable' OK = 'ok' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -87929,6 +89244,7 @@ class ResourceTypeEnum(str, Enum): VPC = 'vpc' + class StatusEnum(str, Enum): """ The status of this VPC. @@ -87943,11 +89259,12 @@ class StatusEnum(str, Enum): PENDING = 'pending' + class VPCCSESourceIP: """ VPCCSESourceIP. - :param IP ip: The cloud service endpoint source IP address for this zone. + :param IP ip: A cloud service endpoint source IP address for this zone. :param ZoneReference zone: The zone this cloud service endpoint source IP resides in. """ @@ -87960,7 +89277,7 @@ def __init__( """ Initialize a VPCCSESourceIP object. - :param IP ip: The cloud service endpoint source IP address for this zone. + :param IP ip: A cloud service endpoint source IP address for this zone. :param ZoneReference zone: The zone this cloud service endpoint source IP resides in. """ @@ -88590,6 +89907,7 @@ class HealthStateEnum(str, Enum): INAPPLICABLE = 'inapplicable' OK = 'ok' + class LifecycleStateEnum(str, Enum): """ The lifecycle state of the DNS resolution binding. @@ -88603,6 +89921,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -88611,6 +89930,7 @@ class ResourceTypeEnum(str, Enum): VPC_DNS_RESOLUTION_BINDING = 'vpc_dns_resolution_binding' + class VPCDNSResolutionBindingCollection: """ VPCDNSResolutionBindingCollection. @@ -88661,9 +89981,7 @@ def from_dict(cls, _dict: Dict) -> 'VPCDNSResolutionBindingCollection': 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'] = PageLink.from_dict(first) else: @@ -88819,6 +90137,7 @@ class CodeEnum(str, Enum): INTERNAL_ERROR = 'internal_error' + class VPCDNSResolutionBindingPatch: """ VPCDNSResolutionBindingPatch. @@ -88953,6 +90272,7 @@ class TypeEnum(str, Enum): SYSTEM = 'system' + class VPCDNSResolverPatch: """ VPCDNSResolverPatch. @@ -89126,6 +90446,7 @@ class TypeEnum(str, Enum): SYSTEM = 'system' + class VPCDNSResolverPrototype: """ VPCDNSResolverPrototype. @@ -89153,12 +90474,7 @@ 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) @@ -89174,6 +90490,7 @@ class TypeEnum(str, Enum): SYSTEM = 'system' + class VPCDNSResolverVPCPatch: """ The VPC to provide DNS server addresses for this VPC. The specified VPC must be @@ -89192,13 +90509,7 @@ def __init__( """ 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) @@ -89291,6 +90602,7 @@ class CodeEnum(str, Enum): INTERNAL_ERROR = 'internal_error' + class VPCIdentity: """ Identifies a VPC by a unique property. @@ -89505,6 +90817,7 @@ class ResourceTypeEnum(str, Enum): VPC = 'vpc' + class VPCReferenceDNSResolverContext: """ A VPC whose DNS resolver is delegated to provide DNS servers for this VPC. @@ -89645,6 +90958,7 @@ class ResourceTypeEnum(str, Enum): VPC = 'vpc' + class VPCReferenceRemote: """ VPCReferenceRemote. @@ -89769,6 +91083,7 @@ class ResourceTypeEnum(str, Enum): VPC = 'vpc' + class VPCRemote: """ If present, this property indicates that the resource associated with this reference @@ -89962,6 +91277,7 @@ class HealthStateEnum(str, Enum): INAPPLICABLE = 'inapplicable' OK = 'ok' + class LifecycleStateEnum(str, Enum): """ The lifecycle state of the VPN gateway. @@ -89975,6 +91291,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -89983,6 +91300,7 @@ class ResourceTypeEnum(str, Enum): VPN_GATEWAY = 'vpn_gateway' + class VPNGatewayCollection: """ VPNGatewayCollection. @@ -90255,6 +91573,7 @@ class AuthenticationModeEnum(str, Enum): PSK = 'psk' + class EstablishModeEnum(str, Enum): """ The establish mode of the VPN gateway connection: @@ -90272,6 +91591,7 @@ class EstablishModeEnum(str, Enum): BIDIRECTIONAL = 'bidirectional' PEER_ONLY = 'peer_only' + class ModeEnum(str, Enum): """ The mode of the VPN gateway. @@ -90283,6 +91603,7 @@ class ModeEnum(str, Enum): POLICY = 'policy' ROUTE = 'route' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -90290,6 +91611,7 @@ class ResourceTypeEnum(str, Enum): VPN_GATEWAY_CONNECTION = 'vpn_gateway_connection' + class StatusEnum(str, Enum): """ The status of a VPN gateway connection. @@ -90299,6 +91621,7 @@ class StatusEnum(str, Enum): UP = 'up' + class VPNGatewayConnectionCIDRs: """ VPNGatewayConnectionCIDRs. @@ -90567,6 +91890,7 @@ class ActionEnum(str, Enum): RESTART = 'restart' + class VPNGatewayConnectionDPDPatch: """ The Dead Peer Detection settings. @@ -90653,6 +91977,7 @@ class ActionEnum(str, Enum): RESTART = 'restart' + class VPNGatewayConnectionDPDPrototype: """ The Dead Peer Detection settings. @@ -90739,6 +92064,7 @@ class ActionEnum(str, Enum): RESTART = 'restart' + class VPNGatewayConnectionIKEIdentity: """ VPNGatewayConnectionIKEIdentity. @@ -90762,14 +92088,7 @@ 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) @@ -90787,6 +92106,7 @@ class TypeEnum(str, Enum): KEY_ID = 'key_id' + class VPNGatewayConnectionIKEIdentityPrototype: """ VPNGatewayConnectionIKEIdentityPrototype. @@ -90804,14 +92124,7 @@ 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) @@ -90826,6 +92139,7 @@ class TypeEnum(str, Enum): KEY_ID = 'key_id' + class VPNGatewayConnectionIKEPolicyPatch: """ The IKE policy to use. Specify `null` to remove any existing policy, [resulting in @@ -90841,12 +92155,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById', - 'VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref', - ] - ) + ", ".join(['VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById', 'VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref']) ) raise Exception(msg) @@ -90866,12 +92175,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById', - 'VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref', - ] - ) + ", ".join(['VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById', 'VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref']) ) raise Exception(msg) @@ -90891,12 +92195,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById', - 'VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref', - ] - ) + ", ".join(['VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById', 'VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref']) ) raise Exception(msg) @@ -90916,12 +92215,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById', - 'VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref', - ] - ) + ", ".join(['VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById', 'VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref']) ) raise Exception(msg) @@ -91126,6 +92420,7 @@ class EstablishModeEnum(str, Enum): PEER_ONLY = 'peer_only' + class VPNGatewayConnectionPeerPatch: """ VPNGatewayConnectionPeerPatch. @@ -91140,12 +92435,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch', - 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch', - ] - ) + ", ".join(['VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch', 'VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch']) ) raise Exception(msg) @@ -91189,9 +92479,7 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionPolicyModeLocal': 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 @@ -91273,9 +92561,7 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionPolicyModeLocalPrototype 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) @@ -91342,12 +92628,7 @@ 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) @@ -91360,6 +92641,7 @@ class TypeEnum(str, Enum): FQDN = 'fqdn' + class VPNGatewayConnectionPolicyModePeerPrototype: """ VPNGatewayConnectionPolicyModePeerPrototype. @@ -91393,12 +92675,7 @@ 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) @@ -91475,12 +92752,7 @@ 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) @@ -91502,6 +92774,7 @@ class EstablishModeEnum(str, Enum): PEER_ONLY = 'peer_only' + class VPNGatewayConnectionReference: """ VPNGatewayConnectionReference. @@ -91616,6 +92889,7 @@ class ResourceTypeEnum(str, Enum): VPN_GATEWAY_CONNECTION = 'vpn_gateway_connection' + class VPNGatewayConnectionStaticRouteModeLocal: """ VPNGatewayConnectionStaticRouteModeLocal. @@ -91649,9 +92923,7 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionStaticRouteModeLocal': 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 @@ -91787,12 +93059,7 @@ 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) @@ -91805,6 +93072,7 @@ class TypeEnum(str, Enum): FQDN = 'fqdn' + class VPNGatewayConnectionStaticRouteModePeerPrototype: """ VPNGatewayConnectionStaticRouteModePeerPrototype. @@ -91835,12 +93103,7 @@ 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) @@ -91888,21 +93151,15 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionStaticRouteModeTunnel': 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] 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 @@ -91960,6 +93217,7 @@ class StatusEnum(str, Enum): UP = 'up' + class VPNGatewayConnectionStatusReason: """ VPNGatewayConnectionStatusReason. @@ -92064,6 +93322,7 @@ class CodeEnum(str, Enum): PEER_NOT_RESPONDING = 'peer_not_responding' + class VPNGatewayConnectionTunnelStatusReason: """ VPNGatewayConnectionTunnelStatusReason. @@ -92229,6 +93488,7 @@ class CodeEnum(str, Enum): PEER_NOT_RESPONDING = 'peer_not_responding' + class VPNGatewayHealthReason: """ VPNGatewayHealthReason. @@ -92342,6 +93602,7 @@ class CodeEnum(str, Enum): INTERNAL_ERROR = 'internal_error' + class VPNGatewayLifecycleReason: """ VPNGatewayLifecycleReason. @@ -92449,6 +93710,7 @@ class CodeEnum(str, Enum): RESOURCE_SUSPENDED_BY_PROVIDER = 'resource_suspended_by_provider' + class VPNGatewayMember: """ VPNGatewayMember. @@ -92640,6 +93902,7 @@ class HealthStateEnum(str, Enum): INAPPLICABLE = 'inapplicable' OK = 'ok' + class LifecycleStateEnum(str, Enum): """ The lifecycle state of the VPN gateway member. @@ -92653,6 +93916,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class RoleEnum(str, Enum): """ The high availability role assigned to the VPN gateway member. @@ -92665,6 +93929,7 @@ class RoleEnum(str, Enum): STANDBY = 'standby' + class VPNGatewayMemberHealthReason: """ VPNGatewayMemberHealthReason. @@ -92774,6 +94039,7 @@ class CodeEnum(str, Enum): INTERNAL_ERROR = 'internal_error' + class VPNGatewayMemberLifecycleReason: """ VPNGatewayMemberLifecycleReason. @@ -92881,6 +94147,7 @@ class CodeEnum(str, Enum): RESOURCE_SUSPENDED_BY_PROVIDER = 'resource_suspended_by_provider' + class VPNGatewayPatch: """ VPNGatewayPatch. @@ -92975,9 +94242,7 @@ 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) @@ -93429,6 +94694,7 @@ class HealthStateEnum(str, Enum): INAPPLICABLE = 'inapplicable' OK = 'ok' + class LifecycleStateEnum(str, Enum): """ The lifecycle state of the VPN server. @@ -93442,6 +94708,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ProtocolEnum(str, Enum): """ The transport protocol to use for this VPN server. @@ -93453,6 +94720,7 @@ class ProtocolEnum(str, Enum): TCP = 'tcp' UDP = 'udp' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -93461,6 +94729,7 @@ class ResourceTypeEnum(str, Enum): VPN_SERVER = 'vpn_server' + class VPNServerAuthentication: """ An authentication method for this VPN server. @@ -93500,6 +94769,7 @@ class MethodEnum(str, Enum): USERNAME = 'username' + class VPNServerAuthenticationByUsernameIdProvider: """ The type of identity provider to be used by VPN client. @@ -93536,12 +94806,7 @@ 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) @@ -93552,12 +94817,7 @@ 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) @@ -93592,6 +94852,7 @@ class MethodEnum(str, Enum): USERNAME = 'username' + class VPNServerClient: """ VPNServerClient. @@ -93788,6 +95049,7 @@ class ResourceTypeEnum(str, Enum): VPN_SERVER_CLIENT = 'vpn_server_client' + class StatusEnum(str, Enum): """ The status of the VPN client: @@ -93802,6 +95064,7 @@ class StatusEnum(str, Enum): DISCONNECTED = 'disconnected' + class VPNServerClientCollection: """ VPNServerClientCollection. @@ -94179,6 +95442,7 @@ class CodeEnum(str, Enum): INTERNAL_ERROR = 'internal_error' + class VPNServerLifecycleReason: """ VPNServerLifecycleReason. @@ -94286,6 +95550,7 @@ class CodeEnum(str, Enum): RESOURCE_SUSPENDED_BY_PROVIDER = 'resource_suspended_by_provider' + class VPNServerPatch: """ VPNServerPatch. @@ -94394,9 +95659,7 @@ def from_dict(cls, _dict: Dict) -> 'VPNServerPatch': 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 - ] + 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: @@ -94493,6 +95756,7 @@ class ProtocolEnum(str, Enum): UDP = 'udp' + class VPNServerRoute: """ VPNServerRoute. @@ -94728,6 +95992,7 @@ class ActionEnum(str, Enum): DROP = 'drop' TRANSLATE = 'translate' + class HealthStateEnum(str, Enum): """ The health of this resource: @@ -94745,6 +96010,7 @@ class HealthStateEnum(str, Enum): INAPPLICABLE = 'inapplicable' OK = 'ok' + class LifecycleStateEnum(str, Enum): """ The lifecycle state of the VPN route. @@ -94758,6 +96024,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -94766,6 +96033,7 @@ class ResourceTypeEnum(str, Enum): VPN_SERVER_ROUTE = 'vpn_server_route' + class VPNServerRouteCollection: """ VPNServerRouteCollection. @@ -94981,6 +96249,7 @@ class CodeEnum(str, Enum): INTERNAL_ERROR = 'internal_error' + class VPNServerRouteLifecycleReason: """ VPNServerRouteLifecycleReason. @@ -95088,6 +96357,7 @@ class CodeEnum(str, Enum): RESOURCE_SUSPENDED_BY_PROVIDER = 'resource_suspended_by_provider' + class VPNServerRoutePatch: """ VPNServerRoutePatch. @@ -95335,9 +96605,7 @@ def from_dict(cls, _dict: Dict) -> 'VirtualNetworkInterface': 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: @@ -95367,9 +96635,7 @@ def from_dict(cls, _dict: Dict) -> 'VirtualNetworkInterface': 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' - ) + 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) else: @@ -95509,6 +96775,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ProtocolStateFilteringModeEnum(str, Enum): """ The protocol state filtering mode used for this virtual network interface. If @@ -95528,6 +96795,7 @@ class ProtocolStateFilteringModeEnum(str, Enum): DISABLED = 'disabled' ENABLED = 'enabled' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -95536,6 +96804,7 @@ class ResourceTypeEnum(str, Enum): VIRTUAL_NETWORK_INTERFACE = 'virtual_network_interface' + class VirtualNetworkInterfaceCollection: """ VirtualNetworkInterfaceCollection. @@ -95598,13 +96867,9 @@ def from_dict(cls, _dict: Dict) -> 'VirtualNetworkInterfaceCollection': 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 - ] + 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 \'virtual_network_interfaces\' not present in VirtualNetworkInterfaceCollection JSON') return cls(**args) @classmethod @@ -95672,12 +96937,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContext', - 'VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext', - ] - ) + ", ".join(['VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContext', 'VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext']) ) raise Exception(msg) @@ -95854,6 +97114,7 @@ class ProtocolStateFilteringModeEnum(str, Enum): ENABLED = 'enabled' + class VirtualNetworkInterfacePrimaryIPPrototype: """ VirtualNetworkInterfacePrimaryIPPrototype. @@ -95868,12 +97129,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext', - 'VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext', - ] - ) + ", ".join(['VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext', 'VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext']) ) raise Exception(msg) @@ -95921,33 +97177,23 @@ def from_dict(cls, _dict: Dict) -> 'VirtualNetworkInterfaceReferenceAttachmentCo 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 @@ -95996,6 +97242,7 @@ class ResourceTypeEnum(str, Enum): VIRTUAL_NETWORK_INTERFACE = 'virtual_network_interface' + class VirtualNetworkInterfaceTarget: """ A virtual network interface target. @@ -96012,13 +97259,7 @@ def __init__( """ 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) @@ -96040,6 +97281,9 @@ class Volume: - `unusable`: Not able to be attached to any virtual server instances. :param int bandwidth: The maximum bandwidth (in megabits per second) for the volume. + The minimum and maximum limits for this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. :param bool busy: Indicates whether this volume is performing an operation that must be serialized. This must be `false` to perform an operation that is specified to require serialization. @@ -96158,6 +97402,9 @@ def __init__( - `unusable`: Not able to be attached to any virtual server instances. :param int bandwidth: The maximum bandwidth (in megabits per second) for the volume. + The minimum and maximum limits for this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. :param bool busy: Indicates whether this volume is performing an operation that must be serialized. This must be `false` to perform an operation that is specified to require serialization. @@ -96362,9 +97609,7 @@ def from_dict(cls, _dict: Dict) -> 'Volume': else: 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') if (zone := _dict.get('zone')) is not None: @@ -96514,6 +97759,7 @@ class AdjustableCapacityStatesEnum(str, Enum): UNATTACHED = 'unattached' UNUSABLE = 'unusable' + class AdjustableIopsStatesEnum(str, Enum): """ The attachment state of the volume @@ -96527,6 +97773,7 @@ class AdjustableIopsStatesEnum(str, Enum): UNATTACHED = 'unattached' UNUSABLE = 'unusable' + class AttachmentStateEnum(str, Enum): """ The attachment state of the volume @@ -96540,6 +97787,7 @@ class AttachmentStateEnum(str, Enum): UNATTACHED = 'unattached' UNUSABLE = 'unusable' + class EncryptionEnum(str, Enum): """ The type of encryption used on the volume. @@ -96548,6 +97796,7 @@ class EncryptionEnum(str, Enum): PROVIDER_MANAGED = 'provider_managed' USER_MANAGED = 'user_managed' + class HealthStateEnum(str, Enum): """ The health of this resource: @@ -96565,6 +97814,7 @@ class HealthStateEnum(str, Enum): INAPPLICABLE = 'inapplicable' OK = 'ok' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -96572,6 +97822,7 @@ class ResourceTypeEnum(str, Enum): VOLUME = 'volume' + class StatusEnum(str, Enum): """ The status of the volume. @@ -96588,6 +97839,7 @@ class StatusEnum(str, Enum): UPDATING = 'updating' + class VolumeAttachment: """ VolumeAttachment. @@ -96688,9 +97940,7 @@ def from_dict(cls, _dict: Dict) -> 'VolumeAttachment': 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: @@ -96784,6 +98034,7 @@ class StatusEnum(str, Enum): DELETING = 'deleting' DETACHING = 'detaching' + class TypeEnum(str, Enum): """ The type of volume attachment. @@ -96796,6 +98047,7 @@ class TypeEnum(str, Enum): DATA = 'data' + class VolumeAttachmentCollection: """ VolumeAttachmentCollection. @@ -97003,8 +98255,9 @@ class VolumeAttachmentPrototype: :param str name: (optional) The name for this volume attachment. The name must not be used by another volume attachment on the instance. If unspecified, the name will be a hyphenated list of randomly-selected words. - :param VolumeAttachmentPrototypeVolume volume: An existing volume to attach to - the instance, or a prototype object for a new volume. + :param VolumeAttachmentPrototypeVolume volume: The volume to use for this + attachment. This can be specified as an existing unattached + volume, or a prototype object for a new volume. """ def __init__( @@ -97017,8 +98270,9 @@ def __init__( """ Initialize a VolumeAttachmentPrototype object. - :param VolumeAttachmentPrototypeVolume volume: An existing volume to attach - to the instance, or a prototype object for a new volume. + :param VolumeAttachmentPrototypeVolume volume: The volume to use for this + attachment. This can be specified as an existing unattached + volume, or a prototype object for a new volume. :param bool delete_volume_on_instance_delete: (optional) Indicates whether deleting the instance will also delete the attached volume. :param str name: (optional) The name for this volume attachment. The name @@ -97127,9 +98381,7 @@ def from_dict(cls, _dict: Dict) -> 'VolumeAttachmentPrototypeInstanceByImageCont if (volume := _dict.get('volume')) is not None: 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 @@ -97216,9 +98468,7 @@ def from_dict(cls, _dict: Dict) -> 'VolumeAttachmentPrototypeInstanceBySourceSna if (volume := _dict.get('volume')) is not None: 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 @@ -97268,7 +98518,7 @@ class VolumeAttachmentPrototypeInstanceByVolumeContext: :param str name: (optional) The name for this volume attachment. The name must not be used by another volume attachment on the instance. If unspecified, the name will be a hyphenated list of randomly-selected words. - :param VolumeIdentity volume: An existing volume to attach. + :param VolumeIdentity volume: An existing unattached volume. """ def __init__( @@ -97281,7 +98531,7 @@ def __init__( """ Initialize a VolumeAttachmentPrototypeInstanceByVolumeContext object. - :param VolumeIdentity volume: An existing volume to attach. + :param VolumeIdentity volume: An existing unattached volume. :param bool delete_volume_on_instance_delete: (optional) Indicates whether deleting the instance will also delete the attached volume. :param str name: (optional) The name for this volume attachment. The name @@ -97303,9 +98553,7 @@ def from_dict(cls, _dict: Dict) -> 'VolumeAttachmentPrototypeInstanceByVolumeCon 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 @@ -97348,7 +98596,8 @@ def __ne__(self, other: 'VolumeAttachmentPrototypeInstanceByVolumeContext') -> b class VolumeAttachmentPrototypeVolume: """ - An existing volume to attach to the instance, or a prototype object for a new volume. + The volume to use for this attachment. This can be specified as an existing unattached + volume, or a prototype object for a new volume. """ @@ -97360,12 +98609,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'VolumeAttachmentPrototypeVolumeVolumeIdentity', - 'VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext', - ] - ) + ", ".join(['VolumeAttachmentPrototypeVolumeVolumeIdentity', 'VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext']) ) raise Exception(msg) @@ -97573,9 +98817,7 @@ def from_dict(cls, _dict: Dict) -> 'VolumeAttachmentReferenceVolumeContext': 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'] = Deleted.from_dict(deleted) if (device := _dict.get('device')) is not None: @@ -97591,9 +98833,7 @@ def from_dict(cls, _dict: Dict) -> 'VolumeAttachmentReferenceVolumeContext': 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: @@ -97669,6 +98909,7 @@ class TypeEnum(str, Enum): DATA = 'data' + class VolumeCatalogOffering: """ VolumeCatalogOffering. @@ -97957,6 +99198,7 @@ class CodeEnum(str, Enum): THROTTLED_BY_INSUFFICIENT_INSTANCE_BANDWIDTH = 'throttled_by_insufficient_instance_bandwidth' + class VolumeIdentity: """ Identifies a volume by a unique property. @@ -98183,9 +99425,7 @@ def from_dict(cls, _dict: Dict) -> 'VolumeProfile': """Initialize a VolumeProfile object from a json dictionary.""" args = {} if (adjustable_capacity_states := _dict.get('adjustable_capacity_states')) is not None: - args['adjustable_capacity_states'] = VolumeProfileAdjustableCapacityStates.from_dict( - adjustable_capacity_states - ) + args['adjustable_capacity_states'] = VolumeProfileAdjustableCapacityStates.from_dict(adjustable_capacity_states) else: raise ValueError('Required property \'adjustable_capacity_states\' not present in VolumeProfile JSON') if (adjustable_iops_states := _dict.get('adjustable_iops_states')) is not None: @@ -98290,6 +99530,7 @@ class FamilyEnum(str, Enum): TIERED = 'tiered' + class VolumeProfileAdjustableCapacityStates: """ VolumeProfileAdjustableCapacityStates. @@ -98367,6 +99608,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class ValuesEnum(str, Enum): """ The attachment state of the volume @@ -98381,6 +99623,7 @@ class ValuesEnum(str, Enum): UNUSABLE = 'unusable' + class VolumeProfileAdjustableIOPSStates: """ VolumeProfileAdjustableIOPSStates. @@ -98458,6 +99701,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class ValuesEnum(str, Enum): """ The attachment state of the volume @@ -98472,6 +99716,7 @@ class ValuesEnum(str, Enum): UNUSABLE = 'unusable' + class VolumeProfileBootCapacity: """ VolumeProfileBootCapacity. @@ -98486,14 +99731,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'VolumeProfileBootCapacityFixed', - 'VolumeProfileBootCapacityRange', - 'VolumeProfileBootCapacityEnum', - 'VolumeProfileBootCapacityDependentRange', - ] - ) + ", ".join(['VolumeProfileBootCapacityFixed', 'VolumeProfileBootCapacityRange', 'VolumeProfileBootCapacityEnum', 'VolumeProfileBootCapacityDependentRange']) ) raise Exception(msg) @@ -98512,14 +99750,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'VolumeProfileCapacityFixed', - 'VolumeProfileCapacityRange', - 'VolumeProfileCapacityEnum', - 'VolumeProfileCapacityDependentRange', - ] - ) + ", ".join(['VolumeProfileCapacityFixed', 'VolumeProfileCapacityRange', 'VolumeProfileCapacityEnum', 'VolumeProfileCapacityDependentRange']) ) raise Exception(msg) @@ -98654,14 +99885,7 @@ def __init__( """ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'VolumeProfileIOPSFixed', - 'VolumeProfileIOPSRange', - 'VolumeProfileIOPSEnum', - 'VolumeProfileIOPSDependentRange', - ] - ) + ", ".join(['VolumeProfileIOPSFixed', 'VolumeProfileIOPSRange', 'VolumeProfileIOPSEnum', 'VolumeProfileIOPSDependentRange']) ) raise Exception(msg) @@ -99066,17 +100290,13 @@ 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) @@ -99277,6 +100497,7 @@ class ResourceTypeEnum(str, Enum): VOLUME = 'volume' + class VolumeReferenceVolumeAttachmentContext: """ VolumeReferenceVolumeAttachmentContext. @@ -99347,9 +100568,7 @@ def from_dict(cls, _dict: Dict) -> 'VolumeReferenceVolumeAttachmentContext': 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 @@ -99403,6 +100622,7 @@ class ResourceTypeEnum(str, Enum): VOLUME = 'volume' + class VolumeRemote: """ If present, this property indicates that the resource associated with this reference @@ -99565,6 +100785,7 @@ class CodeEnum(str, Enum): ENCRYPTION_KEY_DELETED = 'encryption_key_deleted' + class Zone: """ Zone. @@ -99719,6 +100940,7 @@ class StatusEnum(str, Enum): UNAVAILABLE = 'unavailable' + class ZoneCollection: """ ZoneCollection. @@ -100040,6 +101262,147 @@ def __ne__(self, other: 'BackupPolicyJobSourceInstanceReference') -> bool: return not self == other +class BackupPolicyJobSourceShareReference(BackupPolicyJobSource): + """ + BackupPolicyJobSourceShareReference. + + :param str crn: The CRN for this file share. + :param Deleted 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['Deleted'] = None, + remote: Optional['ShareRemote'] = None, + ) -> None: + """ + Initialize a BackupPolicyJobSourceShareReference 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 Deleted 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) -> 'BackupPolicyJobSourceShareReference': + """Initialize a BackupPolicyJobSourceShareReference 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 BackupPolicyJobSourceShareReference JSON') + if (deleted := _dict.get('deleted')) is not None: + args['deleted'] = Deleted.from_dict(deleted) + if (href := _dict.get('href')) is not None: + args['href'] = href + else: + raise ValueError('Required property \'href\' not present in BackupPolicyJobSourceShareReference JSON') + if (id := _dict.get('id')) is not None: + args['id'] = id + else: + raise ValueError('Required property \'id\' not present in BackupPolicyJobSourceShareReference JSON') + if (name := _dict.get('name')) is not None: + args['name'] = name + else: + raise ValueError('Required property \'name\' not present in BackupPolicyJobSourceShareReference 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 BackupPolicyJobSourceShareReference JSON') + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a BackupPolicyJobSourceShareReference 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 BackupPolicyJobSourceShareReference object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'BackupPolicyJobSourceShareReference') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'BackupPolicyJobSourceShareReference') -> 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 BackupPolicyJobSourceVolumeReference(BackupPolicyJobSource): """ BackupPolicyJobSourceVolumeReference. @@ -100121,9 +101484,7 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyJobSourceVolumeReference': 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 @@ -100182,6 +101543,7 @@ class ResourceTypeEnum(str, Enum): VOLUME = 'volume' + class BackupPolicyMatchResourceTypeInstance(BackupPolicy): """ BackupPolicyMatchResourceTypeInstance. @@ -100329,9 +101691,7 @@ 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: @@ -100339,15 +101699,11 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyMatchResourceTypeInstance': if (health_reasons := _dict.get('health_reasons')) is not None: 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: @@ -100361,15 +101717,11 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyMatchResourceTypeInstance': 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: @@ -100381,15 +101733,11 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyMatchResourceTypeInstance': if (resource_group := _dict.get('resource_group')) is not None: 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: @@ -100397,15 +101745,11 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyMatchResourceTypeInstance': 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' - ) + 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 @@ -100462,8 +101806,651 @@ 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: - _dict['included_content'] = self.included_content + 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: + _dict['match_resource_type'] = self.match_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 BackupPolicyMatchResourceTypeInstance object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'BackupPolicyMatchResourceTypeInstance') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'BackupPolicyMatchResourceTypeInstance') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + class HealthStateEnum(str, Enum): + """ + The health of this resource: + - `ok`: No abnormal behavior detected + - `degraded`: Experiencing compromised performance, capacity, or connectivity + - `faulted`: Completely unreachable, inoperative, or otherwise entirely + incapacitated + - `inapplicable`: The health state does not apply because of the current lifecycle + state. A resource with a lifecycle state of `failed` or `deleting` will have a + health state of `inapplicable`. A `pending` resource may also have this state. + """ + + DEGRADED = 'degraded' + FAULTED = 'faulted' + INAPPLICABLE = 'inapplicable' + OK = 'ok' + + + class LifecycleStateEnum(str, Enum): + """ + The lifecycle state of the backup policy. + """ + + DELETING = 'deleting' + FAILED = 'failed' + PENDING = 'pending' + STABLE = 'stable' + SUSPENDED = 'suspended' + UPDATING = 'updating' + WAITING = 'waiting' + + + class ResourceTypeEnum(str, Enum): + """ + The resource type. + """ + + BACKUP_POLICY = 'backup_policy' + + + class IncludedContentEnum(str, Enum): + """ + An item to include. + """ + + 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 + matching type and a matching user tag will be subject to the backup policy. + The enumerated values for this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. + """ + + INSTANCE = 'instance' + + + +class BackupPolicyMatchResourceTypeShare(BackupPolicy): + """ + BackupPolicyMatchResourceTypeShare. + + :param datetime created_at: The date and time that the backup policy was + created. + :param str crn: The CRN for this backup policy. + :param List[BackupPolicyHealthReason] health_reasons: The reasons for the + current `health_state` (if any). + :param str health_state: The health of this resource: + - `ok`: No abnormal behavior detected + - `degraded`: Experiencing compromised performance, capacity, or connectivity + - `faulted`: Completely unreachable, inoperative, or otherwise entirely + incapacitated + - `inapplicable`: The health state does not apply because of the current + lifecycle + state. A resource with a lifecycle state of `failed` or `deleting` will have + a + health state of `inapplicable`. A `pending` resource may also have this + state. + :param str href: The URL for this backup policy. + :param str id: The unique identifier for this backup policy. + :param datetime last_job_completed_at: (optional) The date and time that the + most recent job for this backup policy completed. + If absent, no job has yet completed for this backup policy. + :param str lifecycle_state: The lifecycle state of the backup policy. + :param List[str] match_user_tags: The user tags this backup policy applies to. + Resources that have both a matching user tag and a matching type will be subject + to the backup policy. + :param str name: The name for this backup policy. The name is unique across all + backup policies in the region. + :param List[BackupPolicyPlanReference] plans: The plans for the backup policy. + :param ResourceGroupReference resource_group: The resource group for this backup + policy. + :param str resource_type: The resource type. + :param BackupPolicyScope scope: + :param str match_resource_type: The resource type this backup policy applies to. + Resources that have both a matching type and a matching user tag will be subject + to the backup policy. + The enumerated values for this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. + """ + + def __init__( + self, + created_at: datetime, + crn: str, + health_reasons: List['BackupPolicyHealthReason'], + health_state: str, + href: str, + id: str, + lifecycle_state: str, + match_user_tags: List[str], + name: str, + plans: List['BackupPolicyPlanReference'], + resource_group: 'ResourceGroupReference', + resource_type: str, + scope: 'BackupPolicyScope', + match_resource_type: str, + *, + last_job_completed_at: Optional[datetime] = None, + ) -> None: + """ + Initialize a BackupPolicyMatchResourceTypeShare object. + + :param datetime created_at: The date and time that the backup policy was + created. + :param str crn: The CRN for this backup policy. + :param List[BackupPolicyHealthReason] health_reasons: The reasons for the + current `health_state` (if any). + :param str health_state: The health of this resource: + - `ok`: No abnormal behavior detected + - `degraded`: Experiencing compromised performance, capacity, or + connectivity + - `faulted`: Completely unreachable, inoperative, or otherwise entirely + incapacitated + - `inapplicable`: The health state does not apply because of the current + lifecycle + state. A resource with a lifecycle state of `failed` or `deleting` will + have a + health state of `inapplicable`. A `pending` resource may also have this + state. + :param str href: The URL for this backup policy. + :param str id: The unique identifier for this backup policy. + :param str lifecycle_state: The lifecycle state of the backup policy. + :param List[str] match_user_tags: The user tags this backup policy applies + to. Resources that have both a matching user tag and a matching type will + be subject to the backup policy. + :param str name: The name for this backup policy. The name is unique across + all backup policies in the region. + :param List[BackupPolicyPlanReference] plans: The plans for the backup + policy. + :param ResourceGroupReference resource_group: The resource group for this + backup policy. + :param str resource_type: The resource type. + :param BackupPolicyScope scope: + :param str match_resource_type: The resource type this backup policy + applies to. Resources that have both a matching type and a matching user + tag will be subject to the backup policy. + The enumerated values for this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. + :param datetime last_job_completed_at: (optional) The date and time that + the most recent job for this backup policy completed. + If absent, no job has yet completed for this backup policy. + """ + # pylint: disable=super-init-not-called + self.created_at = created_at + self.crn = crn + self.health_reasons = health_reasons + self.health_state = health_state + self.href = href + self.id = id + self.last_job_completed_at = last_job_completed_at + self.lifecycle_state = lifecycle_state + self.match_user_tags = match_user_tags + self.name = name + self.plans = plans + self.resource_group = resource_group + self.resource_type = resource_type + self.scope = scope + self.match_resource_type = match_resource_type + + @classmethod + def from_dict(cls, _dict: Dict) -> 'BackupPolicyMatchResourceTypeShare': + """Initialize a BackupPolicyMatchResourceTypeShare 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 BackupPolicyMatchResourceTypeShare JSON') + if (crn := _dict.get('crn')) is not None: + args['crn'] = crn + else: + raise ValueError('Required property \'crn\' not present in BackupPolicyMatchResourceTypeShare JSON') + if (health_reasons := _dict.get('health_reasons')) is not None: + args['health_reasons'] = [BackupPolicyHealthReason.from_dict(v) for v in health_reasons] + else: + raise ValueError('Required property \'health_reasons\' not present in BackupPolicyMatchResourceTypeShare 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 BackupPolicyMatchResourceTypeShare JSON') + if (href := _dict.get('href')) is not None: + args['href'] = href + else: + raise ValueError('Required property \'href\' not present in BackupPolicyMatchResourceTypeShare JSON') + if (id := _dict.get('id')) is not None: + args['id'] = id + else: + raise ValueError('Required property \'id\' not present in BackupPolicyMatchResourceTypeShare 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 BackupPolicyMatchResourceTypeShare 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 BackupPolicyMatchResourceTypeShare JSON') + if (name := _dict.get('name')) is not None: + args['name'] = name + else: + raise ValueError('Required property \'name\' not present in BackupPolicyMatchResourceTypeShare JSON') + if (plans := _dict.get('plans')) is not None: + args['plans'] = [BackupPolicyPlanReference.from_dict(v) for v in plans] + else: + raise ValueError('Required property \'plans\' not present in BackupPolicyMatchResourceTypeShare JSON') + if (resource_group := _dict.get('resource_group')) is not None: + args['resource_group'] = ResourceGroupReference.from_dict(resource_group) + else: + raise ValueError('Required property \'resource_group\' not present in BackupPolicyMatchResourceTypeShare 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 BackupPolicyMatchResourceTypeShare JSON') + if (scope := _dict.get('scope')) is not None: + args['scope'] = scope + else: + raise ValueError('Required property \'scope\' not present in BackupPolicyMatchResourceTypeShare 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 BackupPolicyMatchResourceTypeShare JSON') + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a BackupPolicyMatchResourceTypeShare 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, '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, 'health_reasons') and self.health_reasons is not None: + health_reasons_list = [] + for v in self.health_reasons: + if isinstance(v, dict): + health_reasons_list.append(v) + else: + health_reasons_list.append(v.to_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, '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, '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: + _dict['match_user_tags'] = self.match_user_tags + if hasattr(self, 'name') and self.name is not None: + _dict['name'] = self.name + if hasattr(self, 'plans') and self.plans is not None: + plans_list = [] + for v in self.plans: + if isinstance(v, dict): + plans_list.append(v) + else: + plans_list.append(v.to_dict()) + _dict['plans'] = plans_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 + else: + _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, 'scope') and self.scope is not None: + if isinstance(self.scope, 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: + _dict['match_resource_type'] = self.match_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 BackupPolicyMatchResourceTypeShare object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'BackupPolicyMatchResourceTypeShare') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'BackupPolicyMatchResourceTypeShare') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + class HealthStateEnum(str, Enum): + """ + The health of this resource: + - `ok`: No abnormal behavior detected + - `degraded`: Experiencing compromised performance, capacity, or connectivity + - `faulted`: Completely unreachable, inoperative, or otherwise entirely + incapacitated + - `inapplicable`: The health state does not apply because of the current lifecycle + state. A resource with a lifecycle state of `failed` or `deleting` will have a + health state of `inapplicable`. A `pending` resource may also have this state. + """ + + DEGRADED = 'degraded' + FAULTED = 'faulted' + INAPPLICABLE = 'inapplicable' + OK = 'ok' + + + class LifecycleStateEnum(str, Enum): + """ + The lifecycle state of the backup policy. + """ + + DELETING = 'deleting' + FAILED = 'failed' + PENDING = 'pending' + STABLE = 'stable' + SUSPENDED = 'suspended' + UPDATING = 'updating' + WAITING = 'waiting' + + + class ResourceTypeEnum(str, Enum): + """ + The resource type. + """ + + BACKUP_POLICY = 'backup_policy' + + + class MatchResourceTypeEnum(str, Enum): + """ + The resource type this backup policy applies to. Resources that have both a + matching type and a matching user tag will be subject to the backup policy. + The enumerated values for this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. + """ + + SHARE = 'share' + + + +class BackupPolicyMatchResourceTypeVolume(BackupPolicy): + """ + BackupPolicyMatchResourceTypeVolume. + + :param datetime created_at: The date and time that the backup policy was + created. + :param str crn: The CRN for this backup policy. + :param List[BackupPolicyHealthReason] health_reasons: The reasons for the + current `health_state` (if any). + :param str health_state: The health of this resource: + - `ok`: No abnormal behavior detected + - `degraded`: Experiencing compromised performance, capacity, or connectivity + - `faulted`: Completely unreachable, inoperative, or otherwise entirely + incapacitated + - `inapplicable`: The health state does not apply because of the current + lifecycle + state. A resource with a lifecycle state of `failed` or `deleting` will have + a + health state of `inapplicable`. A `pending` resource may also have this + state. + :param str href: The URL for this backup policy. + :param str id: The unique identifier for this backup policy. + :param datetime last_job_completed_at: (optional) The date and time that the + most recent job for this backup policy completed. + If absent, no job has yet completed for this backup policy. + :param str lifecycle_state: The lifecycle state of the backup policy. + :param List[str] match_user_tags: The user tags this backup policy applies to. + Resources that have both a matching user tag and a matching type will be subject + to the backup policy. + :param str name: The name for this backup policy. The name is unique across all + backup policies in the region. + :param List[BackupPolicyPlanReference] plans: The plans for the backup policy. + :param ResourceGroupReference resource_group: The resource group for this backup + policy. + :param str resource_type: The resource type. + :param BackupPolicyScope scope: + :param str match_resource_type: The resource type this backup policy applies to. + Resources that have both a matching type and a matching user tag will be subject + to the backup policy. + The enumerated values for this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. + """ + + def __init__( + self, + created_at: datetime, + crn: str, + health_reasons: List['BackupPolicyHealthReason'], + health_state: str, + href: str, + id: str, + lifecycle_state: str, + match_user_tags: List[str], + name: str, + plans: List['BackupPolicyPlanReference'], + resource_group: 'ResourceGroupReference', + resource_type: str, + scope: 'BackupPolicyScope', + match_resource_type: str, + *, + last_job_completed_at: Optional[datetime] = None, + ) -> None: + """ + Initialize a BackupPolicyMatchResourceTypeVolume object. + + :param datetime created_at: The date and time that the backup policy was + created. + :param str crn: The CRN for this backup policy. + :param List[BackupPolicyHealthReason] health_reasons: The reasons for the + current `health_state` (if any). + :param str health_state: The health of this resource: + - `ok`: No abnormal behavior detected + - `degraded`: Experiencing compromised performance, capacity, or + connectivity + - `faulted`: Completely unreachable, inoperative, or otherwise entirely + incapacitated + - `inapplicable`: The health state does not apply because of the current + lifecycle + state. A resource with a lifecycle state of `failed` or `deleting` will + have a + health state of `inapplicable`. A `pending` resource may also have this + state. + :param str href: The URL for this backup policy. + :param str id: The unique identifier for this backup policy. + :param str lifecycle_state: The lifecycle state of the backup policy. + :param List[str] match_user_tags: The user tags this backup policy applies + to. Resources that have both a matching user tag and a matching type will + be subject to the backup policy. + :param str name: The name for this backup policy. The name is unique across + all backup policies in the region. + :param List[BackupPolicyPlanReference] plans: The plans for the backup + policy. + :param ResourceGroupReference resource_group: The resource group for this + backup policy. + :param str resource_type: The resource type. + :param BackupPolicyScope scope: + :param str match_resource_type: The resource type this backup policy + applies to. Resources that have both a matching type and a matching user + tag will be subject to the backup policy. + The enumerated values for this property may + [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the + future. + :param datetime last_job_completed_at: (optional) The date and time that + the most recent job for this backup policy completed. + If absent, no job has yet completed for this backup policy. + """ + # pylint: disable=super-init-not-called + self.created_at = created_at + self.crn = crn + self.health_reasons = health_reasons + self.health_state = health_state + self.href = href + self.id = id + self.last_job_completed_at = last_job_completed_at + self.lifecycle_state = lifecycle_state + self.match_user_tags = match_user_tags + self.name = name + self.plans = plans + self.resource_group = resource_group + self.resource_type = resource_type + self.scope = scope + self.match_resource_type = match_resource_type + + @classmethod + def from_dict(cls, _dict: Dict) -> 'BackupPolicyMatchResourceTypeVolume': + """Initialize a BackupPolicyMatchResourceTypeVolume 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 BackupPolicyMatchResourceTypeVolume JSON') + if (crn := _dict.get('crn')) is not None: + args['crn'] = crn + else: + 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] + else: + 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') + if (href := _dict.get('href')) is not None: + args['href'] = href + else: + 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) + 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') + 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') + if (name := _dict.get('name')) is not None: + args['name'] = name + else: + 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] + else: + 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) + else: + 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') + 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: + args['match_resource_type'] = match_resource_type + else: + raise ValueError('Required property \'match_resource_type\' not present in BackupPolicyMatchResourceTypeVolume JSON') + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a BackupPolicyMatchResourceTypeVolume 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, '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, 'health_reasons') and self.health_reasons is not None: + health_reasons_list = [] + for v in self.health_reasons: + if isinstance(v, dict): + health_reasons_list.append(v) + else: + health_reasons_list.append(v.to_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, '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, '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: + _dict['match_user_tags'] = self.match_user_tags + if hasattr(self, 'name') and self.name is not None: + _dict['name'] = self.name + if hasattr(self, 'plans') and self.plans is not None: + plans_list = [] + for v in self.plans: + if isinstance(v, dict): + plans_list.append(v) + else: + plans_list.append(v.to_dict()) + _dict['plans'] = plans_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 + else: + _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, 'scope') and self.scope is not None: + if isinstance(self.scope, 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: _dict['match_resource_type'] = self.match_resource_type return _dict @@ -100473,16 +102460,16 @@ def _to_dict(self): return self.to_dict() def __str__(self) -> str: - """Return a `str` version of this BackupPolicyMatchResourceTypeInstance object.""" + """Return a `str` version of this BackupPolicyMatchResourceTypeVolume object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BackupPolicyMatchResourceTypeInstance') -> bool: + def __eq__(self, other: 'BackupPolicyMatchResourceTypeVolume') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'BackupPolicyMatchResourceTypeInstance') -> bool: + def __ne__(self, other: 'BackupPolicyMatchResourceTypeVolume') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -100503,6 +102490,7 @@ class HealthStateEnum(str, Enum): INAPPLICABLE = 'inapplicable' OK = 'ok' + class LifecycleStateEnum(str, Enum): """ The lifecycle state of the backup policy. @@ -100516,6 +102504,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -100523,13 +102512,6 @@ class ResourceTypeEnum(str, Enum): BACKUP_POLICY = 'backup_policy' - class IncludedContentEnum(str, Enum): - """ - An item to include. - """ - - BOOT_VOLUME = 'boot_volume' - DATA_VOLUMES = 'data_volumes' class MatchResourceTypeEnum(str, Enum): """ @@ -100540,241 +102522,106 @@ class MatchResourceTypeEnum(str, Enum): future. """ - INSTANCE = 'instance' + VOLUME = 'volume' -class BackupPolicyMatchResourceTypeVolume(BackupPolicy): + +class BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype(BackupPolicyPrototype): """ - BackupPolicyMatchResourceTypeVolume. + BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype. - :param datetime created_at: The date and time that the backup policy was - created. - :param str crn: The CRN for this backup policy. - :param List[BackupPolicyHealthReason] health_reasons: The reasons for the - current `health_state` (if any). - :param str health_state: The health of this resource: - - `ok`: No abnormal behavior detected - - `degraded`: Experiencing compromised performance, capacity, or connectivity - - `faulted`: Completely unreachable, inoperative, or otherwise entirely - incapacitated - - `inapplicable`: The health state does not apply because of the current - lifecycle - state. A resource with a lifecycle state of `failed` or `deleting` will have - a - health state of `inapplicable`. A `pending` resource may also have this - state. - :param str href: The URL for this backup policy. - :param str id: The unique identifier for this backup policy. - :param datetime last_job_completed_at: (optional) The date and time that the - most recent job for this backup policy completed. - If absent, no job has yet completed for this backup policy. - :param str lifecycle_state: The lifecycle state of the backup policy. - :param List[str] match_user_tags: The user tags this backup policy applies to. - Resources that have both a matching user tag and a matching type will be subject - to the backup policy. - :param str name: The name for this backup policy. The name is unique across all - backup policies in the region. - :param List[BackupPolicyPlanReference] plans: The plans for the backup policy. - :param ResourceGroupReference resource_group: The resource group for this backup - policy. - :param str resource_type: The resource type. - :param BackupPolicyScope scope: - :param str match_resource_type: The resource type this backup policy applies to. - Resources that have both a matching type and a matching user tag will be subject - to the backup policy. - The enumerated values for this property may - [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the - future. + :param List[str] match_user_tags: The user tags this backup policy will apply + to. Resources that have both a matching user tag and a matching type will be + subject to the backup policy. + :param str name: (optional) The name for this backup policy. The name must not + be used by another backup policy in the region. If unspecified, the name will be + a hyphenated list of randomly-selected words. + :param List[BackupPolicyPlanPrototype] plans: (optional) The prototype objects + for backup plans to be created for this backup policy. + :param ResourceGroupIdentity resource_group: (optional) + :param BackupPolicyScopePrototype scope: (optional) + :param List[str] included_content: (optional) The included content for backups + created using this policy: + - `boot_volume`: Include the instance's boot volume. + - `data_volumes`: Include the instance's data volumes. + :param str match_resource_type: The resource type this backup policy will apply + to. Resources that have both a matching type and a matching user tag will be + subject to the backup policy. """ def __init__( self, - created_at: datetime, - crn: str, - health_reasons: List['BackupPolicyHealthReason'], - health_state: str, - href: str, - id: str, - lifecycle_state: str, match_user_tags: List[str], - name: str, - plans: List['BackupPolicyPlanReference'], - resource_group: 'ResourceGroupReference', - resource_type: str, - scope: 'BackupPolicyScope', match_resource_type: str, *, - last_job_completed_at: Optional[datetime] = None, + name: Optional[str] = None, + plans: Optional[List['BackupPolicyPlanPrototype']] = None, + resource_group: Optional['ResourceGroupIdentity'] = None, + scope: Optional['BackupPolicyScopePrototype'] = None, + included_content: Optional[List[str]] = None, ) -> None: """ - Initialize a BackupPolicyMatchResourceTypeVolume object. + Initialize a BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype object. - :param datetime created_at: The date and time that the backup policy was - created. - :param str crn: The CRN for this backup policy. - :param List[BackupPolicyHealthReason] health_reasons: The reasons for the - current `health_state` (if any). - :param str health_state: The health of this resource: - - `ok`: No abnormal behavior detected - - `degraded`: Experiencing compromised performance, capacity, or - connectivity - - `faulted`: Completely unreachable, inoperative, or otherwise entirely - incapacitated - - `inapplicable`: The health state does not apply because of the current - lifecycle - state. A resource with a lifecycle state of `failed` or `deleting` will - have a - health state of `inapplicable`. A `pending` resource may also have this - state. - :param str href: The URL for this backup policy. - :param str id: The unique identifier for this backup policy. - :param str lifecycle_state: The lifecycle state of the backup policy. - :param List[str] match_user_tags: The user tags this backup policy applies - to. Resources that have both a matching user tag and a matching type will - be subject to the backup policy. - :param str name: The name for this backup policy. The name is unique across - all backup policies in the region. - :param List[BackupPolicyPlanReference] plans: The plans for the backup - policy. - :param ResourceGroupReference resource_group: The resource group for this - backup policy. - :param str resource_type: The resource type. - :param BackupPolicyScope scope: - :param str match_resource_type: The resource type this backup policy - applies to. Resources that have both a matching type and a matching user - tag will be subject to the backup policy. - The enumerated values for this property may - [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the - future. - :param datetime last_job_completed_at: (optional) The date and time that - the most recent job for this backup policy completed. - If absent, no job has yet completed for this backup policy. + :param List[str] match_user_tags: The user tags this backup policy will + apply to. Resources that have both a matching user tag and a matching type + will be subject to the backup policy. + :param str match_resource_type: The resource type this backup policy will + apply to. Resources that have both a matching type and a matching user tag + will be subject to the backup policy. + :param str name: (optional) The name for this backup policy. The name must + not be used by another backup policy in the region. If unspecified, the + name will be a hyphenated list of randomly-selected words. + :param List[BackupPolicyPlanPrototype] plans: (optional) The prototype + objects for backup plans to be created for this backup policy. + :param ResourceGroupIdentity resource_group: (optional) + :param BackupPolicyScopePrototype scope: (optional) + :param List[str] included_content: (optional) The included content for + backups created using this policy: + - `boot_volume`: Include the instance's boot volume. + - `data_volumes`: Include the instance's data volumes. """ # pylint: disable=super-init-not-called - self.created_at = created_at - self.crn = crn - self.health_reasons = health_reasons - self.health_state = health_state - self.href = href - self.id = id - self.last_job_completed_at = last_job_completed_at - self.lifecycle_state = lifecycle_state self.match_user_tags = match_user_tags self.name = name self.plans = plans self.resource_group = resource_group - self.resource_type = resource_type self.scope = scope + self.included_content = included_content self.match_resource_type = match_resource_type @classmethod - def from_dict(cls, _dict: Dict) -> 'BackupPolicyMatchResourceTypeVolume': - """Initialize a BackupPolicyMatchResourceTypeVolume object from a json dictionary.""" + def from_dict(cls, _dict: Dict) -> 'BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype': + """Initialize a BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype 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 BackupPolicyMatchResourceTypeVolume JSON') - if (crn := _dict.get('crn')) is not None: - args['crn'] = crn - else: - 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] - else: - 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' - ) - if (href := _dict.get('href')) is not None: - args['href'] = href - else: - 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) - 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' - ) 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 BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype JSON') if (name := _dict.get('name')) is not None: args['name'] = name - else: - 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] - else: - raise ValueError('Required property \'plans\' not present in BackupPolicyMatchResourceTypeVolume JSON') + args['plans'] = [BackupPolicyPlanPrototype.from_dict(v) for v in plans] if (resource_group := _dict.get('resource_group')) is not None: - args['resource_group'] = ResourceGroupReference.from_dict(resource_group) - else: - 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' - ) + args['resource_group'] = resource_group if (scope := _dict.get('scope')) is not None: args['scope'] = scope - else: - raise ValueError('Required property \'scope\' not present in BackupPolicyMatchResourceTypeVolume JSON') + 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: 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 BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype JSON') return cls(**args) @classmethod def _from_dict(cls, _dict): - """Initialize a BackupPolicyMatchResourceTypeVolume object from a json dictionary.""" + """Initialize a BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype 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, '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, 'health_reasons') and self.health_reasons is not None: - health_reasons_list = [] - for v in self.health_reasons: - if isinstance(v, dict): - health_reasons_list.append(v) - else: - health_reasons_list.append(v.to_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, '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, '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: _dict['match_user_tags'] = self.match_user_tags if hasattr(self, 'name') and self.name is not None: @@ -100792,13 +102639,13 @@ def to_dict(self) -> Dict: _dict['resource_group'] = self.resource_group else: _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, 'scope') and self.scope is not None: if isinstance(self.scope, dict): _dict['scope'] = self.scope else: _dict['scope'] = self.scope.to_dict() + 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: _dict['match_resource_type'] = self.match_resource_type return _dict @@ -100808,71 +102655,41 @@ def _to_dict(self): return self.to_dict() def __str__(self) -> str: - """Return a `str` version of this BackupPolicyMatchResourceTypeVolume object.""" + """Return a `str` version of this BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BackupPolicyMatchResourceTypeVolume') -> 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: 'BackupPolicyMatchResourceTypeVolume') -> bool: + def __ne__(self, other: 'BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other - class HealthStateEnum(str, Enum): - """ - The health of this resource: - - `ok`: No abnormal behavior detected - - `degraded`: Experiencing compromised performance, capacity, or connectivity - - `faulted`: Completely unreachable, inoperative, or otherwise entirely - incapacitated - - `inapplicable`: The health state does not apply because of the current lifecycle - state. A resource with a lifecycle state of `failed` or `deleting` will have a - health state of `inapplicable`. A `pending` resource may also have this state. - """ - - DEGRADED = 'degraded' - FAULTED = 'faulted' - INAPPLICABLE = 'inapplicable' - OK = 'ok' - - class LifecycleStateEnum(str, Enum): + class IncludedContentEnum(str, Enum): """ - The lifecycle state of the backup policy. + An item to include. """ - DELETING = 'deleting' - FAILED = 'failed' - PENDING = 'pending' - STABLE = 'stable' - SUSPENDED = 'suspended' - UPDATING = 'updating' - WAITING = 'waiting' - - class ResourceTypeEnum(str, Enum): - """ - The resource type. - """ + BOOT_VOLUME = 'boot_volume' + DATA_VOLUMES = 'data_volumes' - BACKUP_POLICY = 'backup_policy' class MatchResourceTypeEnum(str, Enum): """ - The resource type this backup policy applies to. Resources that have both a + The resource type this backup policy will apply to. Resources that have both a matching type and a matching user tag will be subject to the backup policy. - The enumerated values for this property may - [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the - future. """ - VOLUME = 'volume' + INSTANCE = 'instance' -class BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype(BackupPolicyPrototype): + +class BackupPolicyPrototypeBackupPolicyMatchResourceTypeSharePrototype(BackupPolicyPrototype): """ - BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype. + BackupPolicyPrototypeBackupPolicyMatchResourceTypeSharePrototype. :param List[str] match_user_tags: The user tags this backup policy will apply to. Resources that have both a matching user tag and a matching type will be @@ -100884,10 +102701,6 @@ class BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype(Backup for backup plans to be created for this backup policy. :param ResourceGroupIdentity resource_group: (optional) :param BackupPolicyScopePrototype scope: (optional) - :param List[str] included_content: (optional) The included content for backups - created using this policy: - - `boot_volume`: Include the instance's boot volume. - - `data_volumes`: Include the instance's data volumes. :param str match_resource_type: The resource type this backup policy will apply to. Resources that have both a matching type and a matching user tag will be subject to the backup policy. @@ -100902,10 +102715,9 @@ def __init__( plans: Optional[List['BackupPolicyPlanPrototype']] = None, resource_group: Optional['ResourceGroupIdentity'] = None, scope: Optional['BackupPolicyScopePrototype'] = None, - included_content: Optional[List[str]] = None, ) -> None: """ - Initialize a BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype object. + Initialize a BackupPolicyPrototypeBackupPolicyMatchResourceTypeSharePrototype object. :param List[str] match_user_tags: The user tags this backup policy will apply to. Resources that have both a matching user tag and a matching type @@ -100920,10 +102732,6 @@ def __init__( objects for backup plans to be created for this backup policy. :param ResourceGroupIdentity resource_group: (optional) :param BackupPolicyScopePrototype scope: (optional) - :param List[str] included_content: (optional) The included content for - backups created using this policy: - - `boot_volume`: Include the instance's boot volume. - - `data_volumes`: Include the instance's data volumes. """ # pylint: disable=super-init-not-called self.match_user_tags = match_user_tags @@ -100931,19 +102739,16 @@ def __init__( self.plans = plans self.resource_group = resource_group self.scope = scope - self.included_content = included_content self.match_resource_type = match_resource_type @classmethod - def from_dict(cls, _dict: Dict) -> 'BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype': - """Initialize a BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype object from a json dictionary.""" + def from_dict(cls, _dict: Dict) -> 'BackupPolicyPrototypeBackupPolicyMatchResourceTypeSharePrototype': + """Initialize a BackupPolicyPrototypeBackupPolicyMatchResourceTypeSharePrototype 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 BackupPolicyPrototypeBackupPolicyMatchResourceTypeSharePrototype JSON') if (name := _dict.get('name')) is not None: args['name'] = name if (plans := _dict.get('plans')) is not None: @@ -100952,19 +102757,15 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyPrototypeBackupPolicyMatchResour 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: 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 BackupPolicyPrototypeBackupPolicyMatchResourceTypeSharePrototype JSON') return cls(**args) @classmethod def _from_dict(cls, _dict): - """Initialize a BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype object from a json dictionary.""" + """Initialize a BackupPolicyPrototypeBackupPolicyMatchResourceTypeSharePrototype object from a json dictionary.""" return cls.from_dict(_dict) def to_dict(self) -> Dict: @@ -100992,8 +102793,6 @@ 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: - _dict['included_content'] = self.included_content if hasattr(self, 'match_resource_type') and self.match_resource_type is not None: _dict['match_resource_type'] = self.match_resource_type return _dict @@ -101003,34 +102802,27 @@ def _to_dict(self): return self.to_dict() def __str__(self) -> str: - """Return a `str` version of this BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype object.""" + """Return a `str` version of this BackupPolicyPrototypeBackupPolicyMatchResourceTypeSharePrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype') -> bool: + def __eq__(self, other: 'BackupPolicyPrototypeBackupPolicyMatchResourceTypeSharePrototype') -> bool: """Return `true` when 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: 'BackupPolicyPrototypeBackupPolicyMatchResourceTypeSharePrototype') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other - class IncludedContentEnum(str, Enum): - """ - An item to include. - """ - - 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 matching type and a matching user tag will be subject to the backup policy. """ - INSTANCE = 'instance' + SHARE = 'share' + class BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype(BackupPolicyPrototype): @@ -101094,9 +102886,7 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyPrototypeBackupPolicyMatchResour 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: @@ -101108,9 +102898,7 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyPrototypeBackupPolicyMatchResour 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 @@ -101174,6 +102962,7 @@ class MatchResourceTypeEnum(str, Enum): VOLUME = 'volume' + class BackupPolicyScopePrototypeEnterpriseIdentity(BackupPolicyScopePrototype): """ Identifies an enterprise by a unique property. @@ -101228,9 +103017,7 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyScopeAccountReference': 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 @@ -101273,6 +103060,7 @@ class ResourceTypeEnum(str, Enum): ACCOUNT = 'account' + class BackupPolicyScopeEnterpriseReference(BackupPolicyScope): """ BackupPolicyScopeEnterpriseReference. @@ -101315,9 +103103,7 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyScopeEnterpriseReference': 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 @@ -101362,6 +103148,274 @@ class ResourceTypeEnum(str, Enum): ENTERPRISE = 'enterprise' + +class BackupPolicyTargetSnapshotShareSnapshotReference(BackupPolicyTargetSnapshot): + """ + BackupPolicyTargetSnapshotShareSnapshotReference. + + :param str crn: The CRN for this share snapshot. + :param Deleted 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 share snapshot. + :param str id: The unique identifier for this share snapshot. + :param str name: The name for this share snapshot. The name is unique across all + snapshots for the file share. + :param str resource_type: The resource type. + """ + + def __init__( + self, + crn: str, + href: str, + id: str, + name: str, + resource_type: str, + *, + deleted: Optional['Deleted'] = None, + ) -> None: + """ + Initialize a BackupPolicyTargetSnapshotShareSnapshotReference object. + + :param str crn: The CRN for this share snapshot. + :param str href: The URL for this share snapshot. + :param str id: The unique identifier for this share snapshot. + :param str name: The name for this share snapshot. The name is unique + across all snapshots for the file share. + :param str resource_type: The resource type. + :param Deleted deleted: (optional) If present, this property indicates the + referenced resource has been deleted, and provides + some supplementary information. + """ + # pylint: disable=super-init-not-called + self.crn = crn + self.deleted = deleted + self.href = href + self.id = id + self.name = name + self.resource_type = resource_type + + @classmethod + def from_dict(cls, _dict: Dict) -> 'BackupPolicyTargetSnapshotShareSnapshotReference': + """Initialize a BackupPolicyTargetSnapshotShareSnapshotReference 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 BackupPolicyTargetSnapshotShareSnapshotReference JSON') + if (deleted := _dict.get('deleted')) is not None: + args['deleted'] = Deleted.from_dict(deleted) + if (href := _dict.get('href')) is not None: + args['href'] = href + else: + raise ValueError('Required property \'href\' not present in BackupPolicyTargetSnapshotShareSnapshotReference JSON') + if (id := _dict.get('id')) is not None: + args['id'] = id + else: + raise ValueError('Required property \'id\' not present in BackupPolicyTargetSnapshotShareSnapshotReference JSON') + if (name := _dict.get('name')) is not None: + args['name'] = name + else: + raise ValueError('Required property \'name\' not present in BackupPolicyTargetSnapshotShareSnapshotReference 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 BackupPolicyTargetSnapshotShareSnapshotReference JSON') + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a BackupPolicyTargetSnapshotShareSnapshotReference 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, '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 BackupPolicyTargetSnapshotShareSnapshotReference object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'BackupPolicyTargetSnapshotShareSnapshotReference') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'BackupPolicyTargetSnapshotShareSnapshotReference') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + class ResourceTypeEnum(str, Enum): + """ + The resource type. + """ + + SHARE_SNAPSHOT = 'share_snapshot' + + + +class BackupPolicyTargetSnapshotSnapshotReference(BackupPolicyTargetSnapshot): + """ + BackupPolicyTargetSnapshotSnapshotReference. + + :param str crn: The CRN of this snapshot. + :param Deleted 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 snapshot. + :param str id: The unique identifier for this snapshot. + :param str name: The name for this snapshot. The name is unique across all + snapshots in the region. + :param SnapshotRemote 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['Deleted'] = None, + remote: Optional['SnapshotRemote'] = None, + ) -> None: + """ + Initialize a BackupPolicyTargetSnapshotSnapshotReference object. + + :param str crn: The CRN of this snapshot. + :param str href: The URL for this snapshot. + :param str id: The unique identifier for this snapshot. + :param str name: The name for this snapshot. The name is unique across all + snapshots in the region. + :param str resource_type: The resource type. + :param Deleted deleted: (optional) If present, this property indicates the + referenced resource has been deleted, and provides + some supplementary information. + :param SnapshotRemote 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) -> 'BackupPolicyTargetSnapshotSnapshotReference': + """Initialize a BackupPolicyTargetSnapshotSnapshotReference 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 BackupPolicyTargetSnapshotSnapshotReference JSON') + if (deleted := _dict.get('deleted')) is not None: + args['deleted'] = Deleted.from_dict(deleted) + if (href := _dict.get('href')) is not None: + args['href'] = href + else: + raise ValueError('Required property \'href\' not present in BackupPolicyTargetSnapshotSnapshotReference JSON') + if (id := _dict.get('id')) is not None: + args['id'] = id + else: + raise ValueError('Required property \'id\' not present in BackupPolicyTargetSnapshotSnapshotReference JSON') + if (name := _dict.get('name')) is not None: + args['name'] = name + else: + raise ValueError('Required property \'name\' not present in BackupPolicyTargetSnapshotSnapshotReference 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 BackupPolicyTargetSnapshotSnapshotReference JSON') + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a BackupPolicyTargetSnapshotSnapshotReference 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 BackupPolicyTargetSnapshotSnapshotReference object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'BackupPolicyTargetSnapshotSnapshotReference') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'BackupPolicyTargetSnapshotSnapshotReference') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + class ResourceTypeEnum(str, Enum): + """ + The resource type. + """ + + SNAPSHOT = 'snapshot' + + + class BareMetalServerBootTargetBareMetalServerDiskReference(BareMetalServerBootTarget): """ BareMetalServerBootTargetBareMetalServerDiskReference. @@ -101413,27 +103467,19 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerBootTargetBareMetalServerDisk 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 @@ -101485,9 +103531,8 @@ class ResourceTypeEnum(str, Enum): BARE_METAL_SERVER_DISK = 'bare_metal_server_disk' -class BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount( - BareMetalServerInitializationUserAccount -): + +class BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount(BareMetalServerInitializationUserAccount): """ BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount. @@ -101524,35 +103569,25 @@ 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 @@ -101584,17 +103619,13 @@ 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 @@ -101606,6 +103637,7 @@ class ResourceTypeEnum(str, Enum): HOST_USER_ACCOUNT = 'host_user_account' + class BareMetalServerNetworkAttachmentByPCI(BareMetalServerNetworkAttachment): """ BareMetalServerNetworkAttachmentByPCI. @@ -101719,9 +103751,7 @@ 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: @@ -101733,9 +103763,7 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkAttachmentByPCI': 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: @@ -101743,21 +103771,15 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkAttachmentByPCI': 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: @@ -101767,25 +103789,17 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkAttachmentByPCI': 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 - ) + 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 \'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 @@ -101864,6 +103878,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -101871,6 +103886,7 @@ 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. @@ -101882,6 +103898,7 @@ 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 @@ -101896,6 +103913,7 @@ class InterfaceTypeEnum(str, Enum): PCI = 'pci' + class BareMetalServerNetworkAttachmentByVLAN(BareMetalServerNetworkAttachment): """ BareMetalServerNetworkAttachmentByVLAN. @@ -102029,9 +104047,7 @@ 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: @@ -102043,9 +104059,7 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkAttachmentByVLAN': 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: @@ -102053,21 +104067,15 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkAttachmentByVLAN': 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: @@ -102077,25 +104085,17 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkAttachmentByVLAN': 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 - ) + 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 \'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: @@ -102180,6 +104180,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -102187,6 +104188,7 @@ 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. @@ -102198,6 +104200,7 @@ 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 @@ -102209,9 +104212,8 @@ class InterfaceTypeEnum(str, Enum): VLAN = 'vlan' -class BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity( - BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface -): + +class BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity(BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterface): """ Identifies a virtual network interface by a unique property. @@ -102226,20 +104228,12 @@ def __init__( """ # 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. @@ -102405,9 +104399,7 @@ def __init__( 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: @@ -102491,19 +104483,13 @@ 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 @@ -102527,9 +104513,8 @@ class ProtocolStateFilteringModeEnum(str, Enum): ENABLED = 'enabled' -class BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype( - BareMetalServerNetworkAttachmentPrototype -): + +class BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype(BareMetalServerNetworkAttachmentPrototype): """ BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype. @@ -102587,9 +104572,7 @@ 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: @@ -102597,17 +104580,13 @@ def from_dict( 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 @@ -102639,17 +104618,13 @@ 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 @@ -102668,9 +104643,8 @@ class InterfaceTypeEnum(str, Enum): PCI = 'pci' -class BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype( - BareMetalServerNetworkAttachmentPrototype -): + +class BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype(BareMetalServerNetworkAttachmentPrototype): """ BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype. @@ -102745,9 +104719,7 @@ 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: @@ -102755,23 +104727,17 @@ def from_dict( 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 @@ -102805,17 +104771,13 @@ 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 @@ -102830,6 +104792,7 @@ class InterfaceTypeEnum(str, Enum): VLAN = 'vlan' + class BareMetalServerNetworkInterfaceByHiperSocket(BareMetalServerNetworkInterface): """ BareMetalServerNetworkInterfaceByHiperSocket. @@ -103087,99 +105050,67 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkInterfaceByHiperSocket 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' - ) + 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] 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] 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 @@ -103267,6 +105198,7 @@ class ResourceTypeEnum(str, Enum): NETWORK_INTERFACE = 'network_interface' + class StatusEnum(str, Enum): """ The status of the bare metal server network interface. @@ -103281,6 +105213,7 @@ class StatusEnum(str, Enum): FAILED = 'failed' PENDING = 'pending' + class TypeEnum(str, Enum): """ The bare metal server network interface type. @@ -103294,6 +105227,7 @@ class TypeEnum(str, Enum): PRIMARY = 'primary' SECONDARY = 'secondary' + class InterfaceTypeEnum(str, Enum): """ - `hipersocket`: a virtual network device that provides high-speed TCP/IP @@ -103304,6 +105238,7 @@ class InterfaceTypeEnum(str, Enum): HIPERSOCKET = 'hipersocket' + class BareMetalServerNetworkInterfaceByPCI(BareMetalServerNetworkInterface): """ BareMetalServerNetworkInterfaceByPCI. @@ -103588,27 +105523,19 @@ 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' - ) + 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] 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: @@ -103620,9 +105547,7 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkInterfaceByPCI': 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: @@ -103630,27 +105555,19 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkInterfaceByPCI': 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] 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: @@ -103666,15 +105583,11 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkInterfaceByPCI': 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 @@ -103764,6 +105677,7 @@ class ResourceTypeEnum(str, Enum): NETWORK_INTERFACE = 'network_interface' + class StatusEnum(str, Enum): """ The status of the bare metal server network interface. @@ -103778,6 +105692,7 @@ class StatusEnum(str, Enum): FAILED = 'failed' PENDING = 'pending' + class TypeEnum(str, Enum): """ The bare metal server network interface type. @@ -103791,6 +105706,7 @@ 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 @@ -103805,6 +105721,7 @@ class InterfaceTypeEnum(str, Enum): PCI = 'pci' + class BareMetalServerNetworkInterfaceByVLAN(BareMetalServerNetworkInterface): """ BareMetalServerNetworkInterfaceByVLAN. @@ -104125,27 +106042,19 @@ 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' - ) + 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] 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: @@ -104157,9 +106066,7 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkInterfaceByVLAN': 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: @@ -104167,27 +106074,19 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkInterfaceByVLAN': 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] 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: @@ -104203,15 +106102,11 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkInterfaceByVLAN': 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: @@ -104307,6 +106202,7 @@ class ResourceTypeEnum(str, Enum): NETWORK_INTERFACE = 'network_interface' + class StatusEnum(str, Enum): """ The status of the bare metal server network interface. @@ -104321,6 +106217,7 @@ class StatusEnum(str, Enum): FAILED = 'failed' PENDING = 'pending' + class TypeEnum(str, Enum): """ The bare metal server network interface type. @@ -104334,6 +106231,7 @@ 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 @@ -104348,9 +106246,8 @@ class InterfaceTypeEnum(str, Enum): VLAN = 'vlan' -class BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype( - BareMetalServerNetworkInterfacePrototype -): + +class BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype(BareMetalServerNetworkInterfacePrototype): """ BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype. @@ -104468,9 +106365,7 @@ 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: @@ -104486,15 +106381,11 @@ def from_dict( 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 @@ -104541,17 +106432,13 @@ 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 @@ -104566,9 +106453,8 @@ class InterfaceTypeEnum(str, Enum): HIPERSOCKET = 'hipersocket' -class BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype( - BareMetalServerNetworkInterfacePrototype -): + +class BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype(BareMetalServerNetworkInterfacePrototype): """ BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype. @@ -104700,9 +106586,7 @@ 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: @@ -104718,17 +106602,13 @@ def from_dict( 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 @@ -104777,17 +106657,13 @@ 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 @@ -104806,9 +106682,8 @@ class InterfaceTypeEnum(str, Enum): PCI = 'pci' -class BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype( - BareMetalServerNetworkInterfacePrototype -): + +class BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype(BareMetalServerNetworkInterfacePrototype): """ BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype. @@ -104989,9 +106864,7 @@ 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: @@ -105007,23 +106880,17 @@ def from_dict( if (subnet := _dict.get('subnet')) is not None: args['subnet'] = subnet else: - raise ValueError( - 'Required property \'subnet\' not present in BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype JSON' - ) + 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 @@ -105074,17 +106941,13 @@ 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 @@ -105103,9 +106966,8 @@ class InterfaceTypeEnum(str, Enum): VLAN = 'vlan' -class BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype( - BareMetalServerPrimaryNetworkAttachmentPrototype -): + +class BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype(BareMetalServerPrimaryNetworkAttachmentPrototype): """ BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype. @@ -105163,9 +107025,7 @@ 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: @@ -105173,9 +107033,7 @@ def from_dict( 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: @@ -105211,19 +107069,13 @@ 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 @@ -105242,6 +107094,7 @@ class InterfaceTypeEnum(str, Enum): PCI = 'pci' + class BareMetalServerProfileBandwidthDependent(BareMetalServerProfileBandwidth): """ The total bandwidth shared across the bare metal server network attachments or bare @@ -105311,6 +107164,7 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' + class BareMetalServerProfileBandwidthEnum(BareMetalServerProfileBandwidth): """ The permitted total bandwidth values (in megabits per second) shared across the bare @@ -105400,6 +107254,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class BareMetalServerProfileBandwidthFixed(BareMetalServerProfileBandwidth): """ The total bandwidth (in megabits per second) shared across the bare metal server @@ -105479,6 +107334,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class BareMetalServerProfileBandwidthRange(BareMetalServerProfileBandwidth): """ The permitted total bandwidth range (in megabits per second) shared across the network @@ -105587,6 +107443,7 @@ class TypeEnum(str, Enum): RANGE = 'range' + class BareMetalServerProfileCPUCoreCountDependent(BareMetalServerProfileCPUCoreCount): """ The CPU core count for a bare metal server with this profile depends on its @@ -105614,9 +107471,7 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileCPUCoreCountDependent' 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 @@ -105657,6 +107512,7 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' + class BareMetalServerProfileCPUCoreCountEnum(BareMetalServerProfileCPUCoreCount): """ The permitted values for CPU cores for a bare metal server with this profile. @@ -105744,6 +107600,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class BareMetalServerProfileCPUCoreCountFixed(BareMetalServerProfileCPUCoreCount): """ The CPU core count for a bare metal server with this profile. @@ -105821,6 +107678,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class BareMetalServerProfileCPUCoreCountRange(BareMetalServerProfileCPUCoreCount): """ The permitted range for the number of CPU cores for a bare metal server with this @@ -105864,9 +107722,7 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileCPUCoreCountRange': 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: @@ -105931,6 +107787,7 @@ class TypeEnum(str, Enum): RANGE = 'range' + class BareMetalServerProfileCPUSocketCountDependent(BareMetalServerProfileCPUSocketCount): """ The CPU socket count for a bare metal server with this profile depends on its @@ -105958,9 +107815,7 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileCPUSocketCountDependen 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 @@ -106001,6 +107856,7 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' + class BareMetalServerProfileCPUSocketCountEnum(BareMetalServerProfileCPUSocketCount): """ The permitted values for CPU sockets for a bare metal server with this profile. @@ -106035,9 +107891,7 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileCPUSocketCountEnum': 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: @@ -106045,9 +107899,7 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileCPUSocketCountEnum': 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 @@ -106092,6 +107944,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class BareMetalServerProfileCPUSocketCountFixed(BareMetalServerProfileCPUSocketCount): """ The number of CPU sockets for a bare metal server with this profile. @@ -106126,9 +107979,7 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileCPUSocketCountFixed': 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 @@ -106171,6 +108022,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class BareMetalServerProfileCPUSocketCountRange(BareMetalServerProfileCPUSocketCount): """ The permitted range for the number of CPU sockets for a bare metal server with this @@ -106214,9 +108066,7 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileCPUSocketCountRange': 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: @@ -106281,6 +108131,7 @@ class TypeEnum(str, Enum): RANGE = 'range' + class BareMetalServerProfileDiskQuantityDependent(BareMetalServerProfileDiskQuantity): """ The number of disks of this configuration for a bare metal server with this profile @@ -106308,9 +108159,7 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileDiskQuantityDependent' 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 @@ -106351,6 +108200,7 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' + class BareMetalServerProfileDiskQuantityEnum(BareMetalServerProfileDiskQuantity): """ The permitted the number of disks of this configuration for a bare metal server with @@ -106439,6 +108289,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class BareMetalServerProfileDiskQuantityFixed(BareMetalServerProfileDiskQuantity): """ The number of disks of this configuration for a bare metal server with this profile. @@ -106516,6 +108367,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class BareMetalServerProfileDiskQuantityRange(BareMetalServerProfileDiskQuantity): """ The permitted range for the number of disks of this configuration for a bare metal @@ -106559,9 +108411,7 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileDiskQuantityRange': 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: @@ -106626,6 +108476,7 @@ class TypeEnum(str, Enum): RANGE = 'range' + class BareMetalServerProfileDiskSizeDependent(BareMetalServerProfileDiskSize): """ The disk size in GB (gigabytes) of this configuration for a bare metal server with @@ -106694,6 +108545,7 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' + class BareMetalServerProfileDiskSizeEnum(BareMetalServerProfileDiskSize): """ The permitted disk size in GB (gigabytes) of this configuration for a bare metal @@ -106782,6 +108634,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class BareMetalServerProfileDiskSizeFixed(BareMetalServerProfileDiskSize): """ The size of the disk in GB (gigabytes). @@ -106859,6 +108712,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class BareMetalServerProfileDiskSizeRange(BareMetalServerProfileDiskSize): """ The permitted range for the disk size of this configuration in GB (gigabytes) for a @@ -106967,6 +108821,7 @@ class TypeEnum(str, Enum): RANGE = 'range' + class BareMetalServerProfileIdentityByHref(BareMetalServerProfileIdentity): """ BareMetalServerProfileIdentityByHref. @@ -107155,6 +109010,7 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' + class BareMetalServerProfileMemoryEnum(BareMetalServerProfileMemory): """ The permitted memory values (in gibibytes) for a bare metal server with this profile. @@ -107242,6 +109098,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class BareMetalServerProfileMemoryFixed(BareMetalServerProfileMemory): """ The memory (in gibibytes) for a bare metal server with this profile. @@ -107319,6 +109176,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class BareMetalServerProfileMemoryRange(BareMetalServerProfileMemory): """ The permitted memory range (in gibibytes) for a bare metal server with this profile. @@ -107426,6 +109284,7 @@ class TypeEnum(str, Enum): RANGE = 'range' + class BareMetalServerProfileNetworkAttachmentCountDependent(BareMetalServerProfileNetworkAttachmentCount): """ The number of network attachments supported on a bare metal server with this profile @@ -107453,9 +109312,7 @@ 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 BareMetalServerProfileNetworkAttachmentCountDependent JSON' - ) + raise ValueError('Required property \'type\' not present in BareMetalServerProfileNetworkAttachmentCountDependent JSON') return cls(**args) @classmethod @@ -107496,6 +109353,7 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' + class BareMetalServerProfileNetworkAttachmentCountRange(BareMetalServerProfileNetworkAttachmentCount): """ The number of network attachments supported on a bare metal server with this profile. @@ -107535,9 +109393,7 @@ 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 @@ -107582,6 +109438,7 @@ class TypeEnum(str, Enum): RANGE = 'range' + class BareMetalServerProfileNetworkInterfaceCountDependent(BareMetalServerProfileNetworkInterfaceCount): """ The number of bare metal server network interfaces supported on a bare metal server @@ -107609,9 +109466,7 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileNetworkInterfaceCountD 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 @@ -107652,6 +109507,7 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' + class BareMetalServerProfileNetworkInterfaceCountRange(BareMetalServerProfileNetworkInterfaceCount): """ The number of bare metal server network interfaces supported on a bare metal server @@ -107692,9 +109548,7 @@ 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 @@ -107739,6 +109593,7 @@ class TypeEnum(str, Enum): RANGE = 'range' + class BareMetalServerPrototypeBareMetalServerByNetworkAttachment(BareMetalServerPrototype): """ BareMetalServerPrototypeBareMetalServerByNetworkAttachment. @@ -107758,6 +109613,8 @@ class BareMetalServerPrototypeBareMetalServerByNetworkAttachment(BareMetalServer :param BareMetalServerProfileIdentity profile: The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-bare-metal-servers-profile) to use for this bare metal server. + :param BareMetalServerReservationAffinityPrototype reservation_affinity: + (optional) :param ResourceGroupIdentity resource_group: (optional) :param BareMetalServerTrustedPlatformModulePrototype trusted_platform_module: (optional) @@ -107784,6 +109641,7 @@ def __init__( bandwidth: Optional[int] = None, enable_secure_boot: Optional[bool] = None, name: Optional[str] = None, + reservation_affinity: Optional['BareMetalServerReservationAffinityPrototype'] = None, resource_group: Optional['ResourceGroupIdentity'] = None, trusted_platform_module: Optional['BareMetalServerTrustedPlatformModulePrototype'] = None, vpc: Optional['VPCIdentity'] = None, @@ -107812,6 +109670,8 @@ def __init__( must not be used by another bare metal server in the region. If unspecified, the name will be a hyphenated list of randomly-selected words. The system hostname will be based on this name. + :param BareMetalServerReservationAffinityPrototype reservation_affinity: + (optional) :param ResourceGroupIdentity resource_group: (optional) :param BareMetalServerTrustedPlatformModulePrototype trusted_platform_module: (optional) @@ -107829,6 +109689,7 @@ def __init__( self.initialization = initialization self.name = name self.profile = profile + self.reservation_affinity = reservation_affinity self.resource_group = resource_group self.trusted_platform_module = trusted_platform_module self.vpc = vpc @@ -107847,39 +109708,31 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerPrototypeBareMetalServerByNet if (initialization := _dict.get('initialization')) is not None: 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 (reservation_affinity := _dict.get('reservation_affinity')) is not None: + args['reservation_affinity'] = BareMetalServerReservationAffinityPrototype.from_dict(reservation_affinity) 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 - ) + 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' - ) + 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: 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 @@ -107906,6 +109759,11 @@ 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 isinstance(self.reservation_affinity, dict): + _dict['reservation_affinity'] = self.reservation_affinity + else: + _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 @@ -107979,6 +109837,8 @@ class BareMetalServerPrototypeBareMetalServerByNetworkInterface(BareMetalServerP :param BareMetalServerProfileIdentity profile: The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-bare-metal-servers-profile) to use for this bare metal server. + :param BareMetalServerReservationAffinityPrototype reservation_affinity: + (optional) :param ResourceGroupIdentity resource_group: (optional) :param BareMetalServerTrustedPlatformModulePrototype trusted_platform_module: (optional) @@ -108004,6 +109864,7 @@ def __init__( bandwidth: Optional[int] = None, enable_secure_boot: Optional[bool] = None, name: Optional[str] = None, + reservation_affinity: Optional['BareMetalServerReservationAffinityPrototype'] = None, resource_group: Optional['ResourceGroupIdentity'] = None, trusted_platform_module: Optional['BareMetalServerTrustedPlatformModulePrototype'] = None, vpc: Optional['VPCIdentity'] = None, @@ -108032,6 +109893,8 @@ def __init__( must not be used by another bare metal server in the region. If unspecified, the name will be a hyphenated list of randomly-selected words. The system hostname will be based on this name. + :param BareMetalServerReservationAffinityPrototype reservation_affinity: + (optional) :param ResourceGroupIdentity resource_group: (optional) :param BareMetalServerTrustedPlatformModulePrototype trusted_platform_module: (optional) @@ -108048,6 +109911,7 @@ def __init__( self.initialization = initialization self.name = name self.profile = profile + self.reservation_affinity = reservation_affinity self.resource_group = resource_group self.trusted_platform_module = trusted_platform_module self.vpc = vpc @@ -108066,43 +109930,31 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerPrototypeBareMetalServerByNet if (initialization := _dict.get('initialization')) is not None: 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 (reservation_affinity := _dict.get('reservation_affinity')) is not None: + args['reservation_affinity'] = BareMetalServerReservationAffinityPrototype.from_dict(reservation_affinity) 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 - ) + 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 - ] + 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 - ) + args['primary_network_interface'] = BareMetalServerPrimaryNetworkInterfacePrototype.from_dict(primary_network_interface) else: - raise ValueError( - 'Required property \'primary_network_interface\' not present in BareMetalServerPrototypeBareMetalServerByNetworkInterface JSON' - ) + raise ValueError('Required property \'primary_network_interface\' not present in BareMetalServerPrototypeBareMetalServerByNetworkInterface JSON') return cls(**args) @classmethod @@ -108129,6 +109981,11 @@ 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 isinstance(self.reservation_affinity, dict): + _dict['reservation_affinity'] = self.reservation_affinity + else: + _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 @@ -108213,9 +110070,7 @@ def from_dict(cls, _dict: Dict) -> 'CatalogOfferingIdentityCatalogOfferingByCRN' 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 @@ -108279,9 +110134,7 @@ def from_dict(cls, _dict: Dict) -> 'CatalogOfferingVersionIdentityCatalogOfferin 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 @@ -108345,9 +110198,7 @@ def from_dict(cls, _dict: Dict) -> 'CatalogOfferingVersionPlanIdentityCatalogOff if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError( - 'Required property \'crn\' not present in CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN JSON' - ) + raise ValueError('Required property \'crn\' not present in CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN JSON') return cls(**args) @classmethod @@ -108528,9 +110379,7 @@ def from_dict(cls, _dict: Dict) -> 'CloudObjectStorageBucketIdentityCloudObjectS 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 @@ -108564,9 +110413,7 @@ def __ne__(self, other: 'CloudObjectStorageBucketIdentityCloudObjectStorageBucke return not self == other -class ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContext( - ClusterNetworkInterfacePrimaryIPPrototype -): +class ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContext(ClusterNetworkInterfacePrimaryIPPrototype): """ Identifies a cluster network subnet reserved IP by a unique property. Required if `subnet` is not specified. The cluster network subnet reserved IP must be currently @@ -108583,19 +110430,12 @@ def __init__( """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById', - 'ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref', - ] - ) + ", ".join(['ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById', 'ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref']) ) raise Exception(msg) -class ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext( - ClusterNetworkInterfacePrimaryIPPrototype -): +class ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext(ClusterNetworkInterfacePrimaryIPPrototype): """ The prototype for a new cluster network subnet reserved IP. Requires `subnet` to be specified. @@ -108643,9 +110483,7 @@ def __init__( self.name = name @classmethod - def from_dict( - cls, _dict: Dict - ) -> 'ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext': + def from_dict(cls, _dict: Dict) -> 'ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext': """Initialize a ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext object from a json dictionary.""" args = {} if (address := _dict.get('address')) is not None: @@ -108680,26 +110518,18 @@ def __str__(self) -> str: """Return a `str` version of this ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__( - self, - other: 'ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext', - ) -> bool: + def __eq__(self, other: 'ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__( - self, - other: 'ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext', - ) -> bool: + def __ne__(self, other: 'ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext( - ClusterNetworkInterfaceTarget -): +class ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext(ClusterNetworkInterfaceTarget): """ ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext. @@ -108735,35 +110565,25 @@ def __init__( self.resource_type = resource_type @classmethod - def from_dict( - cls, _dict: Dict - ) -> 'ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext': + def from_dict(cls, _dict: Dict) -> 'ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext': """Initialize a ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext 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 ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext JSON' - ) + raise ValueError('Required property \'href\' not present in ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError( - 'Required property \'id\' not present in ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext JSON' - ) + raise ValueError('Required property \'id\' not present in ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext JSON') if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError( - 'Required property \'name\' not present in ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext JSON' - ) + raise ValueError('Required property \'name\' not present in ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext 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 ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext JSON' - ) + raise ValueError('Required property \'resource_type\' not present in ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext JSON') return cls(**args) @classmethod @@ -108792,19 +110612,13 @@ def __str__(self) -> str: """Return a `str` version of this ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__( - self, - other: 'ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext', - ) -> bool: + def __eq__(self, other: 'ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__( - self, - other: 'ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext', - ) -> bool: + def __ne__(self, other: 'ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -108816,6 +110630,7 @@ class ResourceTypeEnum(str, Enum): INSTANCE_CLUSTER_NETWORK_ATTACHMENT = 'instance_cluster_network_attachment' + class ClusterNetworkProfileIdentityByHref(ClusterNetworkProfileIdentity): """ ClusterNetworkProfileIdentityByHref. @@ -109122,9 +110937,7 @@ def from_dict(cls, _dict: Dict) -> 'ClusterNetworkSubnetPrototypeClusterNetworkS 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 ClusterNetworkSubnetPrototypeClusterNetworkSubnetByIPv4CIDRBlockPrototype JSON' - ) + raise ValueError('Required property \'ipv4_cidr_block\' not present in ClusterNetworkSubnetPrototypeClusterNetworkSubnetByIPv4CIDRBlockPrototype JSON') return cls(**args) @classmethod @@ -109169,6 +110982,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class ClusterNetworkSubnetPrototypeClusterNetworkSubnetByTotalCountPrototype(ClusterNetworkSubnetPrototype): """ ClusterNetworkSubnetPrototypeClusterNetworkSubnetByTotalCountPrototype. @@ -109227,9 +111041,7 @@ def from_dict(cls, _dict: Dict) -> 'ClusterNetworkSubnetPrototypeClusterNetworkS 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 ClusterNetworkSubnetPrototypeClusterNetworkSubnetByTotalCountPrototype JSON' - ) + raise ValueError('Required property \'total_ipv4_address_count\' not present in ClusterNetworkSubnetPrototypeClusterNetworkSubnetByTotalCountPrototype JSON') return cls(**args) @classmethod @@ -109274,9 +111086,8 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' -class ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext( - ClusterNetworkSubnetReservedIPTarget -): + +class ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext(ClusterNetworkSubnetReservedIPTarget): """ ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext. @@ -109319,9 +111130,7 @@ def __init__( self.resource_type = resource_type @classmethod - def from_dict( - cls, _dict: Dict - ) -> 'ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext': + def from_dict(cls, _dict: Dict) -> 'ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext': """Initialize a ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext object from a json dictionary.""" args = {} if (deleted := _dict.get('deleted')) is not None: @@ -109329,27 +111138,19 @@ def from_dict( if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError( - 'Required property \'href\' not present in ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext JSON' - ) + raise ValueError('Required property \'href\' not present in ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError( - 'Required property \'id\' not present in ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext JSON' - ) + raise ValueError('Required property \'id\' not present in ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext JSON') if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError( - 'Required property \'name\' not present in ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext JSON' - ) + raise ValueError('Required property \'name\' not present in ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext 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 ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext JSON' - ) + raise ValueError('Required property \'resource_type\' not present in ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext JSON') return cls(**args) @classmethod @@ -109383,19 +111184,13 @@ def __str__(self) -> str: """Return a `str` version of this ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__( - self, - other: 'ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext', - ) -> bool: + def __eq__(self, other: 'ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__( - self, - other: 'ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext', - ) -> bool: + def __ne__(self, other: 'ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -109407,6 +111202,7 @@ class ResourceTypeEnum(str, Enum): CLUSTER_NETWORK_INTERFACE = 'cluster_network_interface' + class DNSInstanceIdentityByCRN(DNSInstanceIdentity): """ DNSInstanceIdentityByCRN. @@ -109894,6 +111690,7 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' + class DedicatedHostProfileMemoryEnum(DedicatedHostProfileMemory): """ The permitted memory values (in gibibytes) for a dedicated host with this profile. @@ -109981,6 +111778,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class DedicatedHostProfileMemoryFixed(DedicatedHostProfileMemory): """ The memory (in gibibytes) for a dedicated host with this profile. @@ -110058,6 +111856,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class DedicatedHostProfileMemoryRange(DedicatedHostProfileMemory): """ The permitted memory range (in gibibytes) for a dedicated host with this profile. @@ -110165,6 +111964,7 @@ class TypeEnum(str, Enum): RANGE = 'range' + class DedicatedHostProfileSocketDependent(DedicatedHostProfileSocket): """ The CPU socket count for a dedicated host with this profile depends on its @@ -110233,6 +112033,7 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' + class DedicatedHostProfileSocketEnum(DedicatedHostProfileSocket): """ The permitted values for CPU socket count for a dedicated host with this profile. @@ -110320,6 +112121,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class DedicatedHostProfileSocketFixed(DedicatedHostProfileSocket): """ The CPU socket count for a dedicated host with this profile. @@ -110397,6 +112199,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class DedicatedHostProfileSocketRange(DedicatedHostProfileSocket): """ The permitted range for CPU socket count for a dedicated host with this profile. @@ -110504,6 +112307,7 @@ class TypeEnum(str, Enum): RANGE = 'range' + class DedicatedHostProfileVCPUDependent(DedicatedHostProfileVCPU): """ The VCPU count for a dedicated host with this profile depends on its configuration. @@ -110571,6 +112375,7 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' + class DedicatedHostProfileVCPUEnum(DedicatedHostProfileVCPU): """ The permitted values for VCPU count for a dedicated host with this profile. @@ -110658,6 +112463,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class DedicatedHostProfileVCPUFixed(DedicatedHostProfileVCPU): """ The VCPU count for a dedicated host with this profile. @@ -110735,6 +112541,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class DedicatedHostProfileVCPURange(DedicatedHostProfileVCPU): """ The permitted range for VCPU count for a dedicated host with this profile. @@ -110842,6 +112649,7 @@ class TypeEnum(str, Enum): RANGE = 'range' + class DedicatedHostPrototypeDedicatedHostByGroup(DedicatedHostPrototype): """ DedicatedHostPrototypeDedicatedHostByGroup. @@ -110901,17 +112709,13 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostPrototypeDedicatedHostByGroup': 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 @@ -111024,9 +112828,7 @@ def from_dict(cls, _dict: Dict) -> 'DedicatedHostPrototypeDedicatedHostByZone': 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: @@ -111173,9 +112975,7 @@ def __init__( """ # 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) @@ -111242,9 +113042,7 @@ 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 @@ -111287,9 +113085,7 @@ def __ne__(self, other: 'EndpointGatewayReservedIPReservedIPPrototypeTargetConte return not self == other -class EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype( - EndpointGatewayTargetPrototype -): +class EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype(EndpointGatewayTargetPrototype): """ EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype. @@ -111314,23 +113110,17 @@ def __init__( self.resource_type = resource_type @classmethod - def from_dict( - cls, _dict: Dict - ) -> 'EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype': + def from_dict(cls, _dict: Dict) -> 'EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype': """Initialize a EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype 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 EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype JSON' - ) + raise ValueError('Required property \'crn\' not present in EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype 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 EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype JSON' - ) + raise ValueError('Required property \'resource_type\' not present in EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype JSON') return cls(**args) @classmethod @@ -111355,17 +113145,13 @@ def __str__(self) -> str: """Return a `str` version of this EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__( - self, other: 'EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype' - ) -> bool: + def __eq__(self, other: 'EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__( - self, other: 'EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype' - ) -> bool: + def __ne__(self, other: 'EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -111377,9 +113163,8 @@ class ResourceTypeEnum(str, Enum): PRIVATE_PATH_SERVICE_GATEWAY = 'private_path_service_gateway' -class EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype( - EndpointGatewayTargetPrototype -): + +class EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype(EndpointGatewayTargetPrototype): """ EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype. @@ -111406,23 +113191,17 @@ def __init__( self.resource_type = resource_type @classmethod - def from_dict( - cls, _dict: Dict - ) -> 'EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype': + def from_dict(cls, _dict: Dict) -> 'EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype': """Initialize a EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype 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 EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype JSON' - ) + raise ValueError('Required property \'crn\' not present in EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype 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 EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype JSON' - ) + raise ValueError('Required property \'resource_type\' not present in EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype JSON') return cls(**args) @classmethod @@ -111447,17 +113226,13 @@ def __str__(self) -> str: """Return a `str` version of this EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__( - self, other: 'EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype' - ) -> bool: + def __eq__(self, other: 'EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__( - self, other: 'EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype' - ) -> bool: + def __ne__(self, other: 'EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -111469,9 +113244,8 @@ class ResourceTypeEnum(str, Enum): PROVIDER_CLOUD_SERVICE = 'provider_cloud_service' -class EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype( - EndpointGatewayTargetPrototype -): + +class EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype(EndpointGatewayTargetPrototype): """ The name of this provider infrastructure service. @@ -111498,23 +113272,17 @@ def __init__( self.resource_type = resource_type @classmethod - def from_dict( - cls, _dict: Dict - ) -> 'EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype': + def from_dict(cls, _dict: Dict) -> 'EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype': """Initialize a EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype 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 EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype JSON' - ) + raise ValueError('Required property \'name\' not present in EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype 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 EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype JSON' - ) + raise ValueError('Required property \'resource_type\' not present in EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype JSON') return cls(**args) @classmethod @@ -111539,19 +113307,13 @@ def __str__(self) -> str: """Return a `str` version of this EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__( - self, - other: 'EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype', - ) -> bool: + def __eq__(self, other: 'EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__( - self, - other: 'EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype', - ) -> bool: + def __ne__(self, other: 'EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -111563,6 +113325,7 @@ class ResourceTypeEnum(str, Enum): PROVIDER_INFRASTRUCTURE_SERVICE = 'provider_infrastructure_service' + class EndpointGatewayTargetPrivatePathServiceGatewayReference(EndpointGatewayTarget): """ EndpointGatewayTargetPrivatePathServiceGatewayReference. @@ -111624,37 +113387,27 @@ def from_dict(cls, _dict: Dict) -> 'EndpointGatewayTargetPrivatePathServiceGatew if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError( - 'Required property \'crn\' not present in EndpointGatewayTargetPrivatePathServiceGatewayReference JSON' - ) + raise ValueError('Required property \'crn\' not present in EndpointGatewayTargetPrivatePathServiceGatewayReference JSON') if (deleted := _dict.get('deleted')) is not None: args['deleted'] = Deleted.from_dict(deleted) if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError( - 'Required property \'href\' not present in EndpointGatewayTargetPrivatePathServiceGatewayReference JSON' - ) + raise ValueError('Required property \'href\' not present in EndpointGatewayTargetPrivatePathServiceGatewayReference JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: - raise ValueError( - 'Required property \'id\' not present in EndpointGatewayTargetPrivatePathServiceGatewayReference JSON' - ) + raise ValueError('Required property \'id\' not present in EndpointGatewayTargetPrivatePathServiceGatewayReference JSON') if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError( - 'Required property \'name\' not present in EndpointGatewayTargetPrivatePathServiceGatewayReference JSON' - ) + raise ValueError('Required property \'name\' not present in EndpointGatewayTargetPrivatePathServiceGatewayReference JSON') if (remote := _dict.get('remote')) is not None: args['remote'] = PrivatePathServiceGatewayRemote.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 EndpointGatewayTargetPrivatePathServiceGatewayReference JSON' - ) + raise ValueError('Required property \'resource_type\' not present in EndpointGatewayTargetPrivatePathServiceGatewayReference JSON') return cls(**args) @classmethod @@ -111713,6 +113466,7 @@ class ResourceTypeEnum(str, Enum): PRIVATE_PATH_SERVICE_GATEWAY = 'private_path_service_gateway' + class EndpointGatewayTargetProviderCloudServiceReference(EndpointGatewayTarget): """ EndpointGatewayTargetProviderCloudServiceReference. @@ -111745,15 +113499,11 @@ def from_dict(cls, _dict: Dict) -> 'EndpointGatewayTargetProviderCloudServiceRef 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 @@ -111796,6 +113546,7 @@ class ResourceTypeEnum(str, Enum): PROVIDER_CLOUD_SERVICE = 'provider_cloud_service' + class EndpointGatewayTargetProviderInfrastructureServiceReference(EndpointGatewayTarget): """ The name of this provider infrastructure service. @@ -111828,15 +113579,11 @@ def from_dict(cls, _dict: Dict) -> 'EndpointGatewayTargetProviderInfrastructureS 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 @@ -111879,6 +113626,7 @@ class ResourceTypeEnum(str, Enum): PROVIDER_INFRASTRUCTURE_SERVICE = 'provider_infrastructure_service' + class FloatingIPPrototypeFloatingIPByTarget(FloatingIPPrototype): """ FloatingIPPrototypeFloatingIPByTarget. @@ -112085,12 +113833,7 @@ def __init__( """ # 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) @@ -112110,12 +113853,7 @@ def __init__( """ # 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) @@ -112135,13 +113873,7 @@ def __init__( """ # 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) @@ -112161,12 +113893,7 @@ def __init__( """ # 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) @@ -112186,12 +113913,7 @@ def __init__( """ # 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) @@ -112211,13 +113933,7 @@ def __init__( """ # 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) @@ -112298,33 +114014,23 @@ def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetBareMetalServerNetworkInterf 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 @@ -112381,6 +114087,7 @@ class ResourceTypeEnum(str, Enum): NETWORK_INTERFACE = 'network_interface' + class FloatingIPTargetNetworkInterfaceReference(FloatingIPTarget): """ FloatingIPTargetNetworkInterfaceReference. @@ -112465,15 +114172,11 @@ def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetNetworkInterfaceReference': 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 @@ -112530,6 +114233,7 @@ class ResourceTypeEnum(str, Enum): NETWORK_INTERFACE = 'network_interface' + class FloatingIPTargetPublicGatewayReference(FloatingIPTarget): """ FloatingIPTargetPublicGatewayReference. @@ -112601,9 +114305,7 @@ def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetPublicGatewayReference': 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 @@ -112657,6 +114359,7 @@ class ResourceTypeEnum(str, Enum): PUBLIC_GATEWAY = 'public_gateway' + class FloatingIPTargetVirtualNetworkInterfaceReference(FloatingIPTarget): """ FloatingIPTargetVirtualNetworkInterfaceReference. @@ -112720,47 +114423,33 @@ def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetVirtualNetworkInterfaceRefer 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'] = Deleted.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 @@ -112824,6 +114513,7 @@ class ResourceTypeEnum(str, Enum): VIRTUAL_NETWORK_INTERFACE = 'virtual_network_interface' + class FlowLogCollectorTargetPrototypeInstanceIdentity(FlowLogCollectorTargetPrototype): """ Identifies a virtual server instance by a unique property. @@ -112839,13 +114529,7 @@ def __init__( """ # 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) @@ -112865,12 +114549,7 @@ def __init__( """ # 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) @@ -112890,12 +114569,7 @@ def __init__( """ # 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) @@ -112915,13 +114589,7 @@ def __init__( """ # 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) @@ -112941,13 +114609,7 @@ def __init__( """ # 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) @@ -112967,13 +114629,7 @@ def __init__( """ # 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) @@ -113051,47 +114707,31 @@ def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetInstanceNetworkAttachm 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') if (virtual_network_interface := _dict.get('virtual_network_interface')) is not None: - args['virtual_network_interface'] = VirtualNetworkInterfaceReferenceAttachmentContext.from_dict( - virtual_network_interface - ) + args['virtual_network_interface'] = VirtualNetworkInterfaceReferenceAttachmentContext.from_dict(virtual_network_interface) else: - raise ValueError( - 'Required property \'virtual_network_interface\' not present in FlowLogCollectorTargetInstanceNetworkAttachmentReference JSON' - ) + raise ValueError('Required property \'virtual_network_interface\' not present in FlowLogCollectorTargetInstanceNetworkAttachmentReference JSON') return cls(**args) @classmethod @@ -113158,6 +114798,7 @@ class ResourceTypeEnum(str, Enum): INSTANCE_NETWORK_ATTACHMENT = 'instance_network_attachment' + class FlowLogCollectorTargetInstanceReference(FlowLogCollectorTarget): """ FlowLogCollectorTargetInstanceReference. @@ -113334,27 +114975,19 @@ def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetNetworkInterfaceRefere 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 @@ -113406,6 +115039,7 @@ class ResourceTypeEnum(str, Enum): NETWORK_INTERFACE = 'network_interface' + class FlowLogCollectorTargetSubnetReference(FlowLogCollectorTarget): """ FlowLogCollectorTargetSubnetReference. @@ -113477,9 +115111,7 @@ def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetSubnetReference': 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 @@ -113533,6 +115165,7 @@ class ResourceTypeEnum(str, Enum): SUBNET = 'subnet' + class FlowLogCollectorTargetVPCReference(FlowLogCollectorTarget): """ FlowLogCollectorTargetVPCReference. @@ -113604,9 +115237,7 @@ def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetVPCReference': 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 @@ -113660,6 +115291,7 @@ class ResourceTypeEnum(str, Enum): VPC = 'vpc' + class FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext(FlowLogCollectorTarget): """ FlowLogCollectorTargetVirtualNetworkInterfaceReferenceAttachmentContext. @@ -113704,33 +115336,23 @@ def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetVirtualNetworkInterfac 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 @@ -113779,6 +115401,7 @@ class ResourceTypeEnum(str, Enum): VIRTUAL_NETWORK_INTERFACE = 'virtual_network_interface' + class ImageIdentityByCRN(ImageIdentity): """ ImageIdentityByCRN. @@ -114279,9 +115902,7 @@ 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 @@ -114377,9 +115998,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceCatalogOfferingPrototypeCatalogOffer 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 @@ -114466,9 +116085,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceCatalogOfferingPrototypeCatalogOffer 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 @@ -114510,9 +116127,7 @@ def __ne__(self, other: 'InstanceCatalogOfferingPrototypeCatalogOfferingByVersio return not self == other -class InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref( - InstanceClusterNetworkAttachmentBeforePrototype -): +class InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref(InstanceClusterNetworkAttachmentBeforePrototype): """ InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref. @@ -114532,17 +116147,13 @@ def __init__( self.href = href @classmethod - def from_dict( - cls, _dict: Dict - ) -> 'InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref': + def from_dict(cls, _dict: Dict) -> 'InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref': """Initialize a InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref 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 InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref JSON' - ) + raise ValueError('Required property \'href\' not present in InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref JSON') return cls(**args) @classmethod @@ -114565,24 +116176,18 @@ def __str__(self) -> str: """Return a `str` version of this InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__( - self, other: 'InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref' - ) -> bool: + def __eq__(self, other: 'InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__( - self, other: 'InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref' - ) -> bool: + def __ne__(self, other: 'InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById( - InstanceClusterNetworkAttachmentBeforePrototype -): +class InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById(InstanceClusterNetworkAttachmentBeforePrototype): """ InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById. @@ -114604,17 +116209,13 @@ def __init__( self.id = id @classmethod - def from_dict( - cls, _dict: Dict - ) -> 'InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById': + def from_dict(cls, _dict: Dict) -> 'InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById': """Initialize a InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById 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 InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById JSON' - ) + raise ValueError('Required property \'id\' not present in InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById JSON') return cls(**args) @classmethod @@ -114637,24 +116238,18 @@ def __str__(self) -> str: """Return a `str` version of this InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__( - self, other: 'InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById' - ) -> bool: + def __eq__(self, other: 'InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__( - self, other: 'InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById' - ) -> bool: + def __ne__(self, other: 'InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentity( - InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterface -): +class InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentity(InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterface): """ Identifies a cluster network interface by a unique property. @@ -114669,19 +116264,12 @@ def __init__( """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById', - 'InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref', - ] - ) + ", ".join(['InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById', 'InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref']) ) raise Exception(msg) -class InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment( - InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterface -): +class InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment(InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterface): """ The cluster network interface for this target. @@ -114757,9 +116345,7 @@ def __init__( self.subnet = subnet @classmethod - def from_dict( - cls, _dict: Dict - ) -> 'InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment': + def from_dict(cls, _dict: Dict) -> 'InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment': """Initialize a InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment object from a json dictionary.""" args = {} if (auto_delete := _dict.get('auto_delete')) is not None: @@ -114804,19 +116390,13 @@ def __str__(self) -> str: """Return a `str` version of this InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__( - self, - other: 'InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment', - ) -> bool: + def __eq__(self, other: 'InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__( - self, - other: 'InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment', - ) -> bool: + def __ne__(self, other: 'InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -114845,12 +116425,7 @@ 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) @@ -114953,12 +116528,7 @@ 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) @@ -114969,6 +116539,7 @@ class ResourceTypeEnum(str, Enum): INSTANCE_GROUP_MANAGER_ACTION = 'instance_group_manager_action' + class StatusEnum(str, Enum): """ The status of the instance group action @@ -114988,6 +116559,7 @@ class StatusEnum(str, Enum): INCOMPATIBLE = 'incompatible' OMITTED = 'omitted' + class ActionTypeEnum(str, Enum): """ The type of action for the instance group. @@ -114996,6 +116568,7 @@ class ActionTypeEnum(str, Enum): SCHEDULED = 'scheduled' + class InstanceGroupManagerAutoScale(InstanceGroupManager): """ InstanceGroupManagerAutoScale. @@ -115096,9 +116669,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerAutoScale': 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: @@ -115110,9 +116681,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerAutoScale': 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: @@ -115124,15 +116693,11 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerAutoScale': 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' - ) + 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] else: @@ -115205,6 +116770,7 @@ class ManagerTypeEnum(str, Enum): AUTOSCALE = 'autoscale' + class InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype(InstanceGroupManagerPolicyPrototype): """ InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype. @@ -115251,21 +116817,15 @@ 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 @@ -115314,6 +116874,7 @@ class MetricTypeEnum(str, Enum): NETWORK_IN = 'network_in' NETWORK_OUT = 'network_out' + class PolicyTypeEnum(str, Enum): """ The type of policy for the instance group. @@ -115322,6 +116883,7 @@ class PolicyTypeEnum(str, Enum): TARGET = 'target' + class InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy(InstanceGroupManagerPolicy): """ InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy. @@ -115395,51 +116957,35 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerPolicyInstanceGroupManag 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 @@ -115499,6 +117045,7 @@ class MetricTypeEnum(str, Enum): NETWORK_IN = 'network_in' NETWORK_OUT = 'network_out' + class PolicyTypeEnum(str, Enum): """ The type of policy for the instance group @@ -115510,6 +117057,7 @@ class PolicyTypeEnum(str, Enum): TARGET = 'target' + class InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype(InstanceGroupManagerPrototype): """ InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype. @@ -115583,15 +117131,11 @@ 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' - ) + 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' - ) + 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) @@ -115646,6 +117190,7 @@ class ManagerTypeEnum(str, Enum): AUTOSCALE = 'autoscale' + class InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype(InstanceGroupManagerPrototype): """ InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype. @@ -115691,9 +117236,7 @@ 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 @@ -115738,6 +117281,7 @@ class ManagerTypeEnum(str, Enum): SCHEDULED = 'scheduled' + class InstanceGroupManagerScheduled(InstanceGroupManager): """ InstanceGroupManagerScheduled. @@ -115814,9 +117358,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerScheduled': 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: @@ -115893,6 +117435,7 @@ class ManagerTypeEnum(str, Enum): SCHEDULED = 'scheduled' + class InstanceGroupManagerScheduledActionManagerAutoScale(InstanceGroupManagerScheduledActionManager): """ InstanceGroupManagerScheduledActionManagerAutoScale. @@ -115952,21 +117495,15 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerScheduledActionManagerAu 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' - ) + 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: @@ -116017,9 +117554,7 @@ def __ne__(self, other: 'InstanceGroupManagerScheduledActionManagerAutoScale') - 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 @@ -116048,19 +117583,12 @@ 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. @@ -116075,20 +117603,12 @@ def __init__( """ # 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. @@ -116254,9 +117774,7 @@ def __init__( 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: @@ -116340,19 +117858,13 @@ 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 @@ -116376,6 +117888,7 @@ class ProtocolStateFilteringModeEnum(str, Enum): ENABLED = 'enabled' + class InstancePatchProfileInstanceProfileIdentityByHref(InstancePatchProfile): """ InstancePatchProfileInstanceProfileIdentityByHref. @@ -116402,9 +117915,7 @@ def from_dict(cls, _dict: Dict) -> 'InstancePatchProfileInstanceProfileIdentityB 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 @@ -116466,9 +117977,7 @@ def from_dict(cls, _dict: Dict) -> 'InstancePatchProfileInstanceProfileIdentityB 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 @@ -116517,13 +118026,7 @@ def __init__( """ # 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) @@ -116543,13 +118046,7 @@ def __init__( """ # 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) @@ -116569,13 +118066,7 @@ def __init__( """ # 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) @@ -116595,13 +118086,7 @@ def __init__( """ # 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) @@ -116621,13 +118106,7 @@ def __init__( """ # 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) @@ -116685,35 +118164,25 @@ def from_dict(cls, _dict: Dict) -> 'InstancePlacementTargetDedicatedHostGroupRef 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'] = Deleted.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 @@ -116767,6 +118236,7 @@ class ResourceTypeEnum(str, Enum): DEDICATED_HOST_GROUP = 'dedicated_host_group' + class InstancePlacementTargetDedicatedHostReference(InstancePlacementTarget): """ InstancePlacementTargetDedicatedHostReference. @@ -116820,35 +118290,25 @@ def from_dict(cls, _dict: Dict) -> 'InstancePlacementTargetDedicatedHostReferenc 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'] = Deleted.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 @@ -116902,6 +118362,7 @@ class ResourceTypeEnum(str, Enum): DEDICATED_HOST = 'dedicated_host' + class InstancePlacementTargetPlacementGroupReference(InstancePlacementTarget): """ InstancePlacementTargetPlacementGroupReference. @@ -116955,35 +118416,25 @@ def from_dict(cls, _dict: Dict) -> 'InstancePlacementTargetPlacementGroupReferen 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'] = Deleted.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 @@ -117037,6 +118488,7 @@ class ResourceTypeEnum(str, Enum): PLACEMENT_GROUP = 'placement_group' + class InstanceProfileBandwidthDependent(InstanceProfileBandwidth): """ The total bandwidth shared across the network attachments or network interfaces and @@ -117105,6 +118557,7 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' + class InstanceProfileBandwidthEnum(InstanceProfileBandwidth): """ The permitted total bandwidth values (in megabits per second) shared across the @@ -117194,6 +118647,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class InstanceProfileBandwidthFixed(InstanceProfileBandwidth): """ The total bandwidth (in megabits per second) shared across the network attachments or @@ -117272,6 +118726,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class InstanceProfileBandwidthRange(InstanceProfileBandwidth): """ The permitted total bandwidth range (in megabits per second) shared across the network @@ -117381,6 +118836,7 @@ class TypeEnum(str, Enum): RANGE = 'range' + class InstanceProfileClusterNetworkAttachmentCountDependent(InstanceProfileClusterNetworkAttachmentCount): """ The number of cluster network attachments supported on an instance with this profile @@ -117408,9 +118864,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileClusterNetworkAttachmentCount if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError( - 'Required property \'type\' not present in InstanceProfileClusterNetworkAttachmentCountDependent JSON' - ) + raise ValueError('Required property \'type\' not present in InstanceProfileClusterNetworkAttachmentCountDependent JSON') return cls(**args) @classmethod @@ -117451,6 +118905,7 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' + class InstanceProfileClusterNetworkAttachmentCountEnum(InstanceProfileClusterNetworkAttachmentCount): """ The permitted values for cluster network attachment count for an instance with this @@ -117489,15 +118944,11 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileClusterNetworkAttachmentCount if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError( - 'Required property \'type\' not present in InstanceProfileClusterNetworkAttachmentCountEnum JSON' - ) + raise ValueError('Required property \'type\' not present in InstanceProfileClusterNetworkAttachmentCountEnum JSON') if (values := _dict.get('values')) is not None: args['values'] = values else: - raise ValueError( - 'Required property \'values\' not present in InstanceProfileClusterNetworkAttachmentCountEnum JSON' - ) + raise ValueError('Required property \'values\' not present in InstanceProfileClusterNetworkAttachmentCountEnum JSON') return cls(**args) @classmethod @@ -117542,6 +118993,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class InstanceProfileClusterNetworkAttachmentCountRange(InstanceProfileClusterNetworkAttachmentCount): """ The number of network attachments supported on an instance with this profile. @@ -117587,9 +119039,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileClusterNetworkAttachmentCount if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError( - 'Required property \'type\' not present in InstanceProfileClusterNetworkAttachmentCountRange JSON' - ) + raise ValueError('Required property \'type\' not present in InstanceProfileClusterNetworkAttachmentCountRange JSON') return cls(**args) @classmethod @@ -117636,6 +119086,7 @@ class TypeEnum(str, Enum): RANGE = 'range' + class InstanceProfileDiskQuantityDependent(InstanceProfileDiskQuantity): """ The number of disks of this configuration for an instance with this profile depends on @@ -117704,6 +119155,7 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' + class InstanceProfileDiskQuantityEnum(InstanceProfileDiskQuantity): """ The permitted the number of disks of this configuration for an instance with this @@ -117792,6 +119244,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class InstanceProfileDiskQuantityFixed(InstanceProfileDiskQuantity): """ The number of disks of this configuration for an instance with this profile. @@ -117869,6 +119322,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class InstanceProfileDiskQuantityRange(InstanceProfileDiskQuantity): """ The permitted range for the number of disks of this configuration for an instance with @@ -117977,6 +119431,7 @@ class TypeEnum(str, Enum): RANGE = 'range' + class InstanceProfileDiskSizeDependent(InstanceProfileDiskSize): """ The disk size in GB (gigabytes) of this configuration for an instance with this @@ -118045,6 +119500,7 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' + class InstanceProfileDiskSizeEnum(InstanceProfileDiskSize): """ The permitted disk size in GB (gigabytes) of this configuration for an instance with @@ -118133,6 +119589,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class InstanceProfileDiskSizeFixed(InstanceProfileDiskSize): """ The size of the disk in GB (gigabytes). @@ -118210,6 +119667,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class InstanceProfileDiskSizeRange(InstanceProfileDiskSize): """ The permitted range for the disk size of this configuration in GB (gigabytes) for an @@ -118318,6 +119776,7 @@ class TypeEnum(str, Enum): RANGE = 'range' + class InstanceProfileGPUDependent(InstanceProfileGPU): """ The GPU count for an instance with this profile depends on its configuration. @@ -118385,6 +119844,7 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' + class InstanceProfileGPUEnum(InstanceProfileGPU): """ The permitted GPU count values for an instance with this profile. @@ -118472,6 +119932,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class InstanceProfileGPUFixed(InstanceProfileGPU): """ The GPU count for an instance with this profile. @@ -118549,6 +120010,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class InstanceProfileGPUMemoryDependent(InstanceProfileGPUMemory): """ The overall GPU memory value for an instance with this profile depends on its @@ -118617,6 +120079,7 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' + class InstanceProfileGPUMemoryEnum(InstanceProfileGPUMemory): """ The permitted overall GPU memory values in GiB (gibibytes) for an instance with this @@ -118705,6 +120168,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class InstanceProfileGPUMemoryFixed(InstanceProfileGPUMemory): """ The overall GPU memory in GiB (gibibytes) for an instance with this profile. @@ -118782,6 +120246,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class InstanceProfileGPUMemoryRange(InstanceProfileGPUMemory): """ The permitted overall GPU memory range in GiB (gibibytes) for an instance with this @@ -118890,6 +120355,7 @@ class TypeEnum(str, Enum): RANGE = 'range' + class InstanceProfileGPURange(InstanceProfileGPU): """ The permitted GPU count range for an instance with this profile. @@ -118997,6 +120463,7 @@ class TypeEnum(str, Enum): RANGE = 'range' + class InstanceProfileIdentityByHref(InstanceProfileIdentity): """ InstanceProfileIdentityByHref. @@ -119186,6 +120653,7 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' + class InstanceProfileMemoryEnum(InstanceProfileMemory): """ The permitted memory values (in gibibytes) for an instance with this profile. @@ -119273,6 +120741,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class InstanceProfileMemoryFixed(InstanceProfileMemory): """ The memory (in gibibytes) for an instance with this profile. @@ -119350,6 +120819,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class InstanceProfileMemoryRange(InstanceProfileMemory): """ The permitted memory range (in gibibytes) for an instance with this profile. @@ -119457,6 +120927,7 @@ class TypeEnum(str, Enum): RANGE = 'range' + class InstanceProfileNUMACountDependent(InstanceProfileNUMACount): """ The total number of NUMA nodes for an instance with this profile depends on its @@ -119525,6 +120996,7 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' + class InstanceProfileNUMACountFixed(InstanceProfileNUMACount): """ The total number of NUMA nodes for an instance with this profile. @@ -119602,6 +121074,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class InstanceProfileNetworkAttachmentCountDependent(InstanceProfileNetworkAttachmentCount): """ The number of network attachments supported on an instance with this profile is @@ -119629,9 +121102,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileNetworkAttachmentCountDepende 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 @@ -119672,6 +121143,7 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' + class InstanceProfileNetworkAttachmentCountRange(InstanceProfileNetworkAttachmentCount): """ The number of network attachments supported on an instance with this profile. @@ -119711,9 +121183,7 @@ 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 @@ -119758,6 +121228,7 @@ class TypeEnum(str, Enum): RANGE = 'range' + class InstanceProfileNetworkInterfaceCountDependent(InstanceProfileNetworkInterfaceCount): """ The number of network interfaces supported on an instance with this profile is @@ -119785,9 +121256,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceProfileNetworkInterfaceCountDependen 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 @@ -119828,6 +121297,7 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' + class InstanceProfileNetworkInterfaceCountRange(InstanceProfileNetworkInterfaceCount): """ The number of network interfaces supported on an instance with this profile. @@ -119912,6 +121382,7 @@ class TypeEnum(str, Enum): RANGE = 'range' + class InstanceProfilePortSpeedDependent(InstanceProfilePortSpeed): """ The port speed of each network interface of an instance with this profile depends on @@ -119980,6 +121451,7 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' + class InstanceProfilePortSpeedFixed(InstanceProfilePortSpeed): """ The maximum speed (in megabits per second) of each network interface of an instance @@ -120058,6 +121530,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class InstanceProfileVCPUDependent(InstanceProfileVCPU): """ The VCPU count for an instance with this profile depends on its configuration. @@ -120125,6 +121598,7 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' + class InstanceProfileVCPUEnum(InstanceProfileVCPU): """ The permitted values for VCPU count for an instance with this profile. @@ -120212,6 +121686,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class InstanceProfileVCPUFixed(InstanceProfileVCPU): """ The VCPU count for an instance with this profile. @@ -120289,6 +121764,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class InstanceProfileVCPURange(InstanceProfileVCPU): """ The permitted range for VCPU count for an instance with this profile. @@ -120396,6 +121872,7 @@ class TypeEnum(str, Enum): RANGE = 'range' + class InstanceProfileVolumeBandwidthDependent(InstanceProfileVolumeBandwidth): """ The storage bandwidth shared across the storage volumes of an instance with this @@ -120464,6 +121941,7 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' + class InstanceProfileVolumeBandwidthEnum(InstanceProfileVolumeBandwidth): """ The permitted storage bandwidth values (in megabits per second) shared across the @@ -120552,6 +122030,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class InstanceProfileVolumeBandwidthFixed(InstanceProfileVolumeBandwidth): """ The storage bandwidth (in megabits per second) shared across the storage volumes of an @@ -120630,6 +122109,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class InstanceProfileVolumeBandwidthRange(InstanceProfileVolumeBandwidth): """ The permitted storage bandwidth range (in megabits per second) shared across the @@ -120738,6 +122218,7 @@ class TypeEnum(str, Enum): RANGE = 'range' + class InstancePrototypeInstanceByCatalogOffering(InstancePrototype): """ Create an instance by using a catalog offering. @@ -120931,12 +122412,7 @@ 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) @@ -120951,6 +122427,7 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' + class InstancePrototypeInstanceByImage(InstancePrototype): """ Create an instance by using an image. @@ -121132,12 +122609,7 @@ 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) @@ -121152,6 +122624,7 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' + class InstancePrototypeInstanceBySourceSnapshot(InstancePrototype): """ Create an instance by using a snapshot. @@ -121328,12 +122801,7 @@ 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) @@ -121348,6 +122816,7 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' + class InstancePrototypeInstanceBySourceTemplate(InstancePrototype): """ Create an instance by using an instance template. @@ -121613,10 +123082,7 @@ def from_dict(cls, _dict: Dict) -> 'InstancePrototypeInstanceBySourceTemplate': if (availability_policy := _dict.get('availability_policy')) is not None: args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(availability_policy) if (cluster_network_attachments := _dict.get('cluster_network_attachments')) is not None: - args['cluster_network_attachments'] = [ - InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) - for v in cluster_network_attachments - ] + args['cluster_network_attachments'] = [InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) for v in cluster_network_attachments] 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: @@ -121646,9 +123112,7 @@ def from_dict(cls, _dict: Dict) -> 'InstancePrototypeInstanceBySourceTemplate': 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 - ) + 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: @@ -121658,17 +123122,13 @@ def from_dict(cls, _dict: Dict) -> 'InstancePrototypeInstanceBySourceTemplate': 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 - ) + 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) @@ -121837,6 +123297,7 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' + class InstancePrototypeInstanceByVolume(InstancePrototype): """ Create an instance by using a boot volume. @@ -122012,12 +123473,7 @@ 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) @@ -122032,6 +123488,7 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' + class InstanceTemplateIdentityByCRN(InstanceTemplateIdentity): """ InstanceTemplateIdentityByCRN. @@ -122403,12 +123860,7 @@ 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) @@ -122423,6 +123875,7 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' + class InstanceTemplatePrototypeInstanceTemplateByImage(InstanceTemplatePrototype): """ Create an instance template that creates instances by using an image. @@ -122602,12 +124055,7 @@ 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) @@ -122622,6 +124070,7 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' + class InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot(InstanceTemplatePrototype): """ Create an instance template that creates instances by using a snapshot. @@ -122796,12 +124245,7 @@ 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) @@ -122816,6 +124260,7 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' + class InstanceTemplatePrototypeInstanceTemplateBySourceTemplate(InstanceTemplatePrototype): """ Create an instance template from an existing source instance template. @@ -123079,10 +124524,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceTemplatePrototypeInstanceTemplateByS if (availability_policy := _dict.get('availability_policy')) is not None: args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(availability_policy) if (cluster_network_attachments := _dict.get('cluster_network_attachments')) is not None: - args['cluster_network_attachments'] = [ - InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) - for v in cluster_network_attachments - ] + args['cluster_network_attachments'] = [InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) for v in cluster_network_attachments] 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: @@ -123112,9 +124554,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceTemplatePrototypeInstanceTemplateByS 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 - ) + 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: @@ -123124,17 +124564,13 @@ def from_dict(cls, _dict: Dict) -> 'InstanceTemplatePrototypeInstanceTemplateByS 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 - ) + 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) @@ -123303,6 +124739,7 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' + class InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext(InstanceTemplate): """ Create an instance by using a catalog offering. @@ -123508,12 +124945,7 @@ 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) @@ -123528,6 +124960,7 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' + class InstanceTemplateInstanceByImageInstanceTemplateContext(InstanceTemplate): """ Create an instance by using an image. @@ -123720,12 +125153,7 @@ 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) @@ -123740,6 +125168,7 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' + class InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext(InstanceTemplate): """ Create an instance by using a snapshot. @@ -123945,12 +125374,7 @@ 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) @@ -123965,6 +125389,7 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' + class KeyIdentityByCRN(KeyIdentity): """ KeyIdentityByCRN. @@ -124208,9 +125633,7 @@ def __ne__(self, other: 'KeyIdentityById') -> bool: return not self == other -class LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName( - LegacyCloudObjectStorageBucketIdentity -): +class LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName(LegacyCloudObjectStorageBucketIdentity): """ LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName. @@ -124237,9 +125660,7 @@ def from_dict(cls, _dict: Dict) -> 'LegacyCloudObjectStorageBucketIdentityCloudO 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 @@ -124479,9 +125900,7 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerDefaultPoolPatchLoadBala 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 @@ -124541,9 +125960,7 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerDefaultPoolPatchLoadBala 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 @@ -124697,9 +126114,7 @@ def __ne__(self, other: 'LoadBalancerListenerIdentityById') -> bool: return not self == other -class LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch( - LoadBalancerListenerPolicyTargetPatch -): +class LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch(LoadBalancerListenerPolicyTargetPatch): """ LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyHTTPSRedirectPatch. @@ -124731,9 +126146,7 @@ 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: @@ -124771,24 +126184,18 @@ 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. @@ -124849,9 +126256,7 @@ 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: @@ -124908,19 +126313,12 @@ def __init__( """ # 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. @@ -124951,23 +126349,17 @@ 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) @@ -124999,24 +126391,18 @@ 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. @@ -125074,23 +126460,17 @@ 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 @@ -125115,17 +126495,13 @@ 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 @@ -125145,12 +126521,7 @@ def __init__( """ # 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) @@ -125190,15 +126561,11 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerPolicyTargetLoadBalancer 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) @@ -125305,15 +126672,11 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerPolicyTargetLoadBalancer 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 @@ -125396,21 +126759,15 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerListenerPolicyTargetLoadBalancer 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 @@ -125479,9 +126836,7 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolIdentityLoadBalancerPoolIden 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 @@ -125541,9 +126896,7 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolIdentityLoadBalancerPoolIden 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 @@ -125609,9 +126962,7 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolMemberTargetPrototypeIP': 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 @@ -125660,13 +127011,7 @@ def __init__( """ # 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) @@ -125786,29 +127131,21 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolMemberTargetInstanceReferenc 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'] = Deleted.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 @@ -125921,6 +127258,7 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' + class LoadBalancerProfileAvailabilityFixed(LoadBalancerProfileAvailability): """ The availability mode for a load balancer with this profile. @@ -126012,6 +127350,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class ValueEnum(str, Enum): """ The availability of this load balancer: @@ -126028,6 +127367,7 @@ class ValueEnum(str, Enum): SUBNET = 'subnet' + class LoadBalancerProfileIdentityByHref(LoadBalancerProfileIdentity): """ LoadBalancerProfileIdentityByHref. @@ -126175,9 +127515,7 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerProfileInstanceGroupsSupportedDe 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 @@ -126218,6 +127556,7 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' + class LoadBalancerProfileInstanceGroupsSupportedFixed(LoadBalancerProfileInstanceGroupsSupported): """ The instance groups support for a load balancer with this profile. @@ -126248,15 +127587,11 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerProfileInstanceGroupsSupportedFi 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 @@ -126299,6 +127634,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class LoadBalancerProfileRouteModeSupportedDependent(LoadBalancerProfileRouteModeSupported): """ The route mode support for a load balancer with this profile depends on its @@ -126326,9 +127662,7 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerProfileRouteModeSupportedDepende 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 @@ -126369,6 +127703,7 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' + class LoadBalancerProfileRouteModeSupportedFixed(LoadBalancerProfileRouteModeSupported): """ The route mode support for a load balancer with this profile. @@ -126399,15 +127734,11 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerProfileRouteModeSupportedFixed': 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 @@ -126450,6 +127781,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class LoadBalancerProfileSecurityGroupsSupportedDependent(LoadBalancerProfileSecurityGroupsSupported): """ The security group support for a load balancer with this profile depends on its @@ -126477,9 +127809,7 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerProfileSecurityGroupsSupportedDe 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 @@ -126520,6 +127850,7 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' + class LoadBalancerProfileSecurityGroupsSupportedFixed(LoadBalancerProfileSecurityGroupsSupported): """ The security group support for a load balancer with this profile. @@ -126550,15 +127881,11 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerProfileSecurityGroupsSupportedFi 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 @@ -126601,9 +127928,8 @@ class TypeEnum(str, Enum): FIXED = 'fixed' -class LoadBalancerProfileSourceIPSessionPersistenceSupportedDependent( - LoadBalancerProfileSourceIPSessionPersistenceSupported -): + +class LoadBalancerProfileSourceIPSessionPersistenceSupportedDependent(LoadBalancerProfileSourceIPSessionPersistenceSupported): """ The source IP session persistence support for a load balancer with this profile depends on its configuration. @@ -126630,9 +127956,7 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerProfileSourceIPSessionPersistenc if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError( - 'Required property \'type\' not present in LoadBalancerProfileSourceIPSessionPersistenceSupportedDependent JSON' - ) + raise ValueError('Required property \'type\' not present in LoadBalancerProfileSourceIPSessionPersistenceSupportedDependent JSON') return cls(**args) @classmethod @@ -126673,9 +127997,8 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' -class LoadBalancerProfileSourceIPSessionPersistenceSupportedFixed( - LoadBalancerProfileSourceIPSessionPersistenceSupported -): + +class LoadBalancerProfileSourceIPSessionPersistenceSupportedFixed(LoadBalancerProfileSourceIPSessionPersistenceSupported): """ The source IP session persistence support for a load balancer with this profile. @@ -126705,15 +128028,11 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerProfileSourceIPSessionPersistenc if (type := _dict.get('type')) is not None: args['type'] = type else: - raise ValueError( - 'Required property \'type\' not present in LoadBalancerProfileSourceIPSessionPersistenceSupportedFixed JSON' - ) + raise ValueError('Required property \'type\' not present in LoadBalancerProfileSourceIPSessionPersistenceSupportedFixed JSON') if (value := _dict.get('value')) is not None: args['value'] = value else: - raise ValueError( - 'Required property \'value\' not present in LoadBalancerProfileSourceIPSessionPersistenceSupportedFixed JSON' - ) + raise ValueError('Required property \'value\' not present in LoadBalancerProfileSourceIPSessionPersistenceSupportedFixed JSON') return cls(**args) @classmethod @@ -126756,6 +128075,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class LoadBalancerProfileUDPSupportedDependent(LoadBalancerProfileUDPSupported): """ The UDP support for a load balancer with this profile depends on its configuration. @@ -126823,6 +128143,7 @@ class TypeEnum(str, Enum): DEPENDENT = 'dependent' + class LoadBalancerProfileUDPSupportedFixed(LoadBalancerProfileUDPSupported): """ The UDP support for a load balancer with this profile. @@ -126900,6 +128221,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class NetworkACLIdentityByCRN(NetworkACLIdentity): """ NetworkACLIdentityByCRN. @@ -127234,15 +128556,11 @@ 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 @@ -127317,9 +128635,7 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleBeforePatchNetworkACLRuleIdent 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 @@ -127379,9 +128695,7 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleBeforePatchNetworkACLRuleIdent 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 @@ -127441,9 +128755,7 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleBeforePrototypeNetworkACLRuleI 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 @@ -127503,9 +128815,7 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleBeforePrototypeNetworkACLRuleI 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 @@ -127616,35 +128926,25 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleItemNetworkACLRuleProtocolAll' 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: @@ -127652,27 +128952,19 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleItemNetworkACLRuleProtocolAll' 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 @@ -127736,6 +129028,7 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' + class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -127744,6 +129037,7 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' + class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -127751,6 +129045,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class ProtocolEnum(str, Enum): """ The network protocol. @@ -127759,6 +129054,7 @@ class ProtocolEnum(str, Enum): ALL = 'all' + class NetworkACLRuleItemNetworkACLRuleProtocolICMP(NetworkACLRuleItem): """ NetworkACLRuleItemNetworkACLRuleProtocolICMP. @@ -127848,67 +129144,47 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleItemNetworkACLRuleProtocolICMP 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) @@ -127978,6 +129254,7 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' + class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -127986,6 +129263,7 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' + class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -127993,6 +129271,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class ProtocolEnum(str, Enum): """ The network protocol. @@ -128001,6 +129280,7 @@ class ProtocolEnum(str, Enum): ICMP = 'icmp' + class NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP(NetworkACLRuleItem): """ NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP. @@ -128102,89 +129382,61 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleItemNetworkACLRuleProtocolTCPU 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' - ) + 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' - ) + 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 @@ -128256,6 +129508,7 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' + class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -128264,6 +129517,7 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' + class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -128271,6 +129525,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class ProtocolEnum(str, Enum): """ The network protocol. @@ -128280,9 +129535,8 @@ class ProtocolEnum(str, Enum): UDP = 'udp' -class NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype( - NetworkACLRulePrototypeNetworkACLContext -): + +class NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype(NetworkACLRulePrototypeNetworkACLContext): """ NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype. @@ -128341,21 +129595,15 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRulePrototypeNetworkACLContextNetw 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: @@ -128363,15 +129611,11 @@ 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 @@ -128424,6 +129668,7 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' + class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -128432,6 +129677,7 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' + class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -128439,6 +129685,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class ProtocolEnum(str, Enum): """ The network protocol. @@ -128447,9 +129694,8 @@ class ProtocolEnum(str, Enum): ALL = 'all' -class NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype( - NetworkACLRulePrototypeNetworkACLContext -): + +class NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype(NetworkACLRulePrototypeNetworkACLContext): """ NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype. @@ -128522,21 +129768,15 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRulePrototypeNetworkACLContextNetw 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: @@ -128544,17 +129784,13 @@ 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) @@ -128613,6 +129849,7 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' + class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -128621,6 +129858,7 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' + class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -128628,6 +129866,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class ProtocolEnum(str, Enum): """ The network protocol. @@ -128636,9 +129875,8 @@ class ProtocolEnum(str, Enum): ICMP = 'icmp' -class NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype( - NetworkACLRulePrototypeNetworkACLContext -): + +class NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype(NetworkACLRulePrototypeNetworkACLContext): """ NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype. @@ -128721,21 +129959,15 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRulePrototypeNetworkACLContextNetw 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: @@ -128743,9 +129975,7 @@ 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' - ) + 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: @@ -128753,9 +129983,7 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRulePrototypeNetworkACLContextNetw 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: @@ -128820,6 +130048,7 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' + class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -128828,6 +130057,7 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' + class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -128835,6 +130065,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class ProtocolEnum(str, Enum): """ The network protocol. @@ -128844,6 +130075,7 @@ class ProtocolEnum(str, Enum): UDP = 'udp' + class NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype(NetworkACLRulePrototype): """ NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype. @@ -128907,23 +130139,17 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRulePrototypeNetworkACLRuleProtoco 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: @@ -128931,15 +130157,11 @@ 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 @@ -128997,6 +130219,7 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' + class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -129005,6 +130228,7 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' + class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -129012,6 +130236,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class ProtocolEnum(str, Enum): """ The network protocol. @@ -129020,6 +130245,7 @@ class ProtocolEnum(str, Enum): ALL = 'all' + class NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype(NetworkACLRulePrototype): """ NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype. @@ -129097,23 +130323,17 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRulePrototypeNetworkACLRuleProtoco 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: @@ -129121,17 +130341,13 @@ 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) @@ -129195,6 +130411,7 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' + class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -129203,6 +130420,7 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' + class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -129210,6 +130428,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class ProtocolEnum(str, Enum): """ The network protocol. @@ -129218,6 +130437,7 @@ class ProtocolEnum(str, Enum): ICMP = 'icmp' + class NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype(NetworkACLRulePrototype): """ NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype. @@ -129305,23 +130525,17 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRulePrototypeNetworkACLRuleProtoco 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: @@ -129329,9 +130543,7 @@ 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' - ) + 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: @@ -129339,9 +130551,7 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRulePrototypeNetworkACLRuleProtoco 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: @@ -129411,6 +130621,7 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' + class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -129419,6 +130630,7 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' + class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -129426,6 +130638,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class ProtocolEnum(str, Enum): """ The network protocol. @@ -129435,6 +130648,7 @@ class ProtocolEnum(str, Enum): UDP = 'udp' + class NetworkACLRuleNetworkACLRuleProtocolAll(NetworkACLRule): """ NetworkACLRuleNetworkACLRuleProtocolAll. @@ -129516,21 +130730,15 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleNetworkACLRuleProtocolAll': 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: @@ -129542,9 +130750,7 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleNetworkACLRuleProtocolAll': 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: @@ -129556,9 +130762,7 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleNetworkACLRuleProtocolAll': 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 @@ -129622,6 +130826,7 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' + class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -129630,6 +130835,7 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' + class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -129637,6 +130843,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class ProtocolEnum(str, Enum): """ The network protocol. @@ -129645,6 +130852,7 @@ class ProtocolEnum(str, Enum): ALL = 'all' + class NetworkACLRuleNetworkACLRuleProtocolICMP(NetworkACLRule): """ NetworkACLRuleNetworkACLRuleProtocolICMP. @@ -129732,29 +130940,21 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleNetworkACLRuleProtocolICMP': 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: @@ -129766,9 +130966,7 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleNetworkACLRuleProtocolICMP': 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: @@ -129776,17 +130974,13 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleNetworkACLRuleProtocolICMP': 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) @@ -129856,6 +131050,7 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' + class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -129864,6 +131059,7 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' + class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -129871,6 +131067,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class ProtocolEnum(str, Enum): """ The network protocol. @@ -129879,6 +131076,7 @@ class ProtocolEnum(str, Enum): ICMP = 'icmp' + class NetworkACLRuleNetworkACLRuleProtocolTCPUDP(NetworkACLRule): """ NetworkACLRuleNetworkACLRuleProtocolTCPUDP. @@ -129978,35 +131176,25 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleNetworkACLRuleProtocolTCPUDP': 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: @@ -130014,51 +131202,35 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleNetworkACLRuleProtocolTCPUDP': 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' - ) + 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' - ) + 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 @@ -130130,6 +131302,7 @@ class ActionEnum(str, Enum): ALLOW = 'allow' DENY = 'deny' + class DirectionEnum(str, Enum): """ The direction of traffic to match. @@ -130138,6 +131311,7 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' + class IpVersionEnum(str, Enum): """ The IP version for this rule. @@ -130145,6 +131319,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class ProtocolEnum(str, Enum): """ The network protocol. @@ -130154,6 +131329,7 @@ class ProtocolEnum(str, Enum): UDP = 'udp' + class NetworkInterfaceIPPrototypeReservedIPIdentity(NetworkInterfaceIPPrototype): """ Identifies a reserved IP by a unique property. @@ -130169,12 +131345,7 @@ def __init__( """ # 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) @@ -130405,14 +131576,7 @@ def __init__( """ # 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) @@ -130523,9 +131687,7 @@ def from_dict(cls, _dict: Dict) -> 'PublicGatewayIdentityPublicGatewayIdentityBy 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 @@ -130585,9 +131747,7 @@ def from_dict(cls, _dict: Dict) -> 'PublicGatewayIdentityPublicGatewayIdentityBy 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 @@ -130647,9 +131807,7 @@ def from_dict(cls, _dict: Dict) -> 'PublicGatewayIdentityPublicGatewayIdentityBy 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 @@ -130983,6 +132141,184 @@ def __ne__(self, other: 'ReservationIdentityById') -> bool: return not self == other +class ReservationProfileBareMetalServerProfileReference(ReservationProfile): + """ + ReservationProfileBareMetalServerProfileReference. + + :param str href: The URL for this bare metal server profile. + :param str name: The name for this bare metal server profile. + :param str resource_type: The resource type. + """ + + def __init__( + self, + href: str, + name: str, + resource_type: str, + ) -> None: + """ + Initialize a ReservationProfileBareMetalServerProfileReference object. + + :param str href: The URL for this bare metal server profile. + :param str name: The name for this bare metal server profile. + :param str resource_type: The resource type. + """ + # pylint: disable=super-init-not-called + self.href = href + self.name = name + self.resource_type = resource_type + + @classmethod + def from_dict(cls, _dict: Dict) -> 'ReservationProfileBareMetalServerProfileReference': + """Initialize a ReservationProfileBareMetalServerProfileReference 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 ReservationProfileBareMetalServerProfileReference JSON') + if (name := _dict.get('name')) is not None: + args['name'] = name + else: + raise ValueError('Required property \'name\' not present in ReservationProfileBareMetalServerProfileReference 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 ReservationProfileBareMetalServerProfileReference JSON') + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a ReservationProfileBareMetalServerProfileReference 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, '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 + 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 ReservationProfileBareMetalServerProfileReference object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'ReservationProfileBareMetalServerProfileReference') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'ReservationProfileBareMetalServerProfileReference') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + class ResourceTypeEnum(str, Enum): + """ + The resource type. + """ + + BARE_METAL_SERVER_PROFILE = 'bare_metal_server_profile' + + + +class ReservationProfileInstanceProfileReference(ReservationProfile): + """ + ReservationProfileInstanceProfileReference. + + :param str href: The URL for this virtual server instance profile. + :param str name: The globally unique name for this virtual server instance + profile. + :param str resource_type: The resource type. + """ + + def __init__( + self, + href: str, + name: str, + resource_type: str, + ) -> None: + """ + Initialize a ReservationProfileInstanceProfileReference object. + + :param str href: The URL for this virtual server instance profile. + :param str name: The globally unique name for this virtual server instance + profile. + :param str resource_type: The resource type. + """ + # pylint: disable=super-init-not-called + self.href = href + self.name = name + self.resource_type = resource_type + + @classmethod + def from_dict(cls, _dict: Dict) -> 'ReservationProfileInstanceProfileReference': + """Initialize a ReservationProfileInstanceProfileReference 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 ReservationProfileInstanceProfileReference JSON') + if (name := _dict.get('name')) is not None: + args['name'] = name + else: + raise ValueError('Required property \'name\' not present in ReservationProfileInstanceProfileReference 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 ReservationProfileInstanceProfileReference JSON') + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a ReservationProfileInstanceProfileReference 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, '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 + 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 ReservationProfileInstanceProfileReference object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'ReservationProfileInstanceProfileReference') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'ReservationProfileInstanceProfileReference') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + class ResourceTypeEnum(str, Enum): + """ + The resource type. + """ + + INSTANCE_PROFILE = 'instance_profile' + + + class ReservedIPTargetPrototypeEndpointGatewayIdentity(ReservedIPTargetPrototype): """ ReservedIPTargetPrototypeEndpointGatewayIdentity. @@ -130998,13 +132334,7 @@ def __init__( """ # 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) @@ -131024,13 +132354,7 @@ def __init__( """ # 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) @@ -131107,27 +132431,19 @@ def from_dict(cls, _dict: Dict) -> 'ReservedIPTargetBareMetalServerNetworkInterf 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 @@ -131179,6 +132495,7 @@ class ResourceTypeEnum(str, Enum): NETWORK_INTERFACE = 'network_interface' + class ReservedIPTargetEndpointGatewayReference(ReservedIPTarget): """ ReservedIPTargetEndpointGatewayReference. @@ -131250,9 +132567,7 @@ def from_dict(cls, _dict: Dict) -> 'ReservedIPTargetEndpointGatewayReference': 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 @@ -131306,6 +132621,7 @@ class ResourceTypeEnum(str, Enum): ENDPOINT_GATEWAY = 'endpoint_gateway' + class ReservedIPTargetGenericResourceReference(ReservedIPTarget): """ Identifying information for a resource that is not native to the VPC API. @@ -131351,9 +132667,7 @@ def from_dict(cls, _dict: Dict) -> 'ReservedIPTargetGenericResourceReference': 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 @@ -131401,6 +132715,7 @@ class ResourceTypeEnum(str, Enum): CLOUD_RESOURCE = 'cloud_resource' + class ReservedIPTargetLoadBalancerReference(ReservedIPTarget): """ ReservedIPTargetLoadBalancerReference. @@ -131472,9 +132787,7 @@ def from_dict(cls, _dict: Dict) -> 'ReservedIPTargetLoadBalancerReference': 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 @@ -131528,6 +132841,7 @@ class ResourceTypeEnum(str, Enum): LOAD_BALANCER = 'load_balancer' + class ReservedIPTargetNetworkInterfaceReferenceTargetContext(ReservedIPTarget): """ ReservedIPTargetNetworkInterfaceReferenceTargetContext. @@ -131596,27 +132910,19 @@ def from_dict(cls, _dict: Dict) -> 'ReservedIPTargetNetworkInterfaceReferenceTar 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 @@ -131668,6 +132974,7 @@ class ResourceTypeEnum(str, Enum): NETWORK_INTERFACE = 'network_interface' + class ReservedIPTargetVPNGatewayReference(ReservedIPTarget): """ ReservedIPTargetVPNGatewayReference. @@ -131739,9 +133046,7 @@ def from_dict(cls, _dict: Dict) -> 'ReservedIPTargetVPNGatewayReference': 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 @@ -131795,6 +133100,7 @@ class ResourceTypeEnum(str, Enum): VPN_GATEWAY = 'vpn_gateway' + class ReservedIPTargetVPNServerReference(ReservedIPTarget): """ ReservedIPTargetVPNServerReference. @@ -131866,9 +133172,7 @@ def from_dict(cls, _dict: Dict) -> 'ReservedIPTargetVPNServerReference': 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 @@ -131922,6 +133226,7 @@ class ResourceTypeEnum(str, Enum): VPN_SERVER = 'vpn_server' + class ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext(ReservedIPTarget): """ ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext. @@ -131966,33 +133271,23 @@ def from_dict(cls, _dict: Dict) -> 'ReservedIPTargetVirtualNetworkInterfaceRefer 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 @@ -132041,6 +133336,7 @@ class ResourceTypeEnum(str, Enum): VIRTUAL_NETWORK_INTERFACE = 'virtual_network_interface' + class ResourceGroupIdentityById(ResourceGroupIdentity): """ ResourceGroupIdentityById. @@ -132226,6 +133522,7 @@ class ResourceTypeEnum(str, Enum): VPN_GATEWAY = 'vpn_gateway' + class RouteCreatorVPNServerReference(RouteCreator): """ RouteCreatorVPNServerReference. @@ -132351,6 +133648,7 @@ class ResourceTypeEnum(str, Enum): VPN_SERVER = 'vpn_server' + class RouteNextHopIP(RouteNextHop): """ RouteNextHopIP. @@ -132432,12 +133730,7 @@ def __init__( """ # 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) @@ -132457,12 +133750,7 @@ def __init__( """ # 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) @@ -132482,12 +133770,7 @@ def __init__( """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP', - 'RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP', - ] - ) + ", ".join(['RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP', 'RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP']) ) raise Exception(msg) @@ -132507,12 +133790,7 @@ def __init__( """ # pylint: disable=super-init-not-called msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( - ", ".join( - [ - 'RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById', - 'RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref', - ] - ) + ", ".join(['RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById', 'RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref']) ) raise Exception(msg) @@ -132580,9 +133858,7 @@ def from_dict(cls, _dict: Dict) -> 'RouteNextHopVPNGatewayConnectionReference': 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 @@ -132634,6 +133910,7 @@ class ResourceTypeEnum(str, Enum): VPN_GATEWAY_CONNECTION = 'vpn_gateway_connection' + class RoutingTableIdentityByCRN(RoutingTableIdentity): """ RoutingTableIdentityByCRN. @@ -133468,9 +134745,7 @@ 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 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: @@ -133478,9 +134753,7 @@ 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) @@ -133537,6 +134810,7 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' + class IpVersionEnum(str, Enum): """ The IP version to allow. The format of `local.address`, `remote.address`, @@ -133548,6 +134822,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class ProtocolEnum(str, Enum): """ The network protocol. @@ -133556,6 +134831,7 @@ class ProtocolEnum(str, Enum): ALL = 'all' + class SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP(SecurityGroupRulePrototype): """ A rule specifying the ICMP traffic to allow. @@ -133650,9 +134926,7 @@ 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: @@ -133660,9 +134934,7 @@ 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: @@ -133725,6 +134997,7 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' + class IpVersionEnum(str, Enum): """ The IP version to allow. The format of `local.address`, `remote.address`, @@ -133736,6 +135009,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class ProtocolEnum(str, Enum): """ The network protocol. @@ -133744,6 +135018,7 @@ class ProtocolEnum(str, Enum): ICMP = 'icmp' + class SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP(SecurityGroupRulePrototype): """ A rule specifying the TCP or UDP traffic to allow. @@ -133850,9 +135125,7 @@ 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 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: @@ -133864,9 +135137,7 @@ 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) @@ -133927,6 +135198,7 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' + class IpVersionEnum(str, Enum): """ The IP version to allow. The format of `local.address`, `remote.address`, @@ -133938,6 +135210,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class ProtocolEnum(str, Enum): """ The network protocol. @@ -133947,6 +135220,7 @@ class ProtocolEnum(str, Enum): UDP = 'udp' + class SecurityGroupRuleRemotePatchCIDR(SecurityGroupRuleRemotePatch): """ SecurityGroupRuleRemotePatchCIDR. @@ -134094,13 +135368,7 @@ def __init__( """ # 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) @@ -134137,9 +135405,7 @@ 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 @@ -134254,13 +135520,7 @@ def __init__( """ # 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) @@ -134446,29 +135706,21 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleRemoteSecurityGroupReferenc 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'] = Deleted.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 @@ -134573,45 +135825,31 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleSecurityGroupRuleProtocolAl 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 @@ -134670,6 +135908,7 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' + class IpVersionEnum(str, Enum): """ The IP version to allow. The format of `local.address`, `remote.address`, @@ -134681,6 +135920,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class ProtocolEnum(str, Enum): """ The network protocol. @@ -134689,6 +135929,7 @@ class ProtocolEnum(str, Enum): ALL = 'all' + class SecurityGroupRuleSecurityGroupRuleProtocolICMP(SecurityGroupRule): """ A rule specifying the ICMP traffic to allow. @@ -134762,47 +136003,33 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleSecurityGroupRuleProtocolIC 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) @@ -134867,6 +136094,7 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' + class IpVersionEnum(str, Enum): """ The IP version to allow. The format of `local.address`, `remote.address`, @@ -134878,6 +136106,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class ProtocolEnum(str, Enum): """ The network protocol. @@ -134886,6 +136115,7 @@ class ProtocolEnum(str, Enum): ICMP = 'icmp' + class SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP(SecurityGroupRule): """ A rule specifying the TCP or UDP traffic to allow. @@ -134962,39 +136192,27 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleSecurityGroupRuleProtocolTC 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: @@ -135002,9 +136220,7 @@ 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 @@ -135067,6 +136283,7 @@ class DirectionEnum(str, Enum): INBOUND = 'inbound' OUTBOUND = 'outbound' + class IpVersionEnum(str, Enum): """ The IP version to allow. The format of `local.address`, `remote.address`, @@ -135078,6 +136295,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class ProtocolEnum(str, Enum): """ The network protocol. @@ -135087,6 +136305,7 @@ class ProtocolEnum(str, Enum): UDP = 'udp' + class SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext(SecurityGroupTargetReference): """ SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext. @@ -135151,9 +136370,7 @@ 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: @@ -135161,27 +136378,19 @@ def from_dict( 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 @@ -135215,17 +136424,13 @@ 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 @@ -135237,6 +136442,7 @@ class ResourceTypeEnum(str, Enum): NETWORK_INTERFACE = 'network_interface' + class SecurityGroupTargetReferenceEndpointGatewayReference(SecurityGroupTargetReference): """ SecurityGroupTargetReferenceEndpointGatewayReference. @@ -135290,35 +136496,25 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupTargetReferenceEndpointGatewayR 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'] = Deleted.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 @@ -135372,6 +136568,7 @@ class ResourceTypeEnum(str, Enum): ENDPOINT_GATEWAY = 'endpoint_gateway' + class SecurityGroupTargetReferenceLoadBalancerReference(SecurityGroupTargetReference): """ SecurityGroupTargetReferenceLoadBalancerReference. @@ -135425,35 +136622,25 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupTargetReferenceLoadBalancerRefe 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'] = Deleted.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 @@ -135507,6 +136694,7 @@ class ResourceTypeEnum(str, Enum): LOAD_BALANCER = 'load_balancer' + class SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext(SecurityGroupTargetReference): """ SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext. @@ -135575,27 +136763,19 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupTargetReferenceNetworkInterface 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 @@ -135647,6 +136827,7 @@ class ResourceTypeEnum(str, Enum): NETWORK_INTERFACE = 'network_interface' + class SecurityGroupTargetReferenceVPNServerReference(SecurityGroupTargetReference): """ SecurityGroupTargetReferenceVPNServerReference. @@ -135700,35 +136881,25 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupTargetReferenceVPNServerReferen 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'] = Deleted.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 @@ -135782,6 +136953,7 @@ class ResourceTypeEnum(str, Enum): VPN_SERVER = 'vpn_server' + class SecurityGroupTargetReferenceVirtualNetworkInterfaceReference(SecurityGroupTargetReference): """ SecurityGroupTargetReferenceVirtualNetworkInterfaceReference. @@ -135845,47 +137017,33 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupTargetReferenceVirtualNetworkIn 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'] = Deleted.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 @@ -135949,6 +137107,7 @@ class ResourceTypeEnum(str, Enum): VIRTUAL_NETWORK_INTERFACE = 'virtual_network_interface' + class ShareAccessorBindingAccessorShareReference(ShareAccessorBindingAccessor): """ ShareAccessorBindingAccessorShareReference. @@ -136016,9 +137175,7 @@ def from_dict(cls, _dict: Dict) -> 'ShareAccessorBindingAccessorShareReference': if (href := _dict.get('href')) is not None: args['href'] = href else: - raise ValueError( - 'Required property \'href\' not present in ShareAccessorBindingAccessorShareReference JSON' - ) + raise ValueError('Required property \'href\' not present in ShareAccessorBindingAccessorShareReference JSON') if (id := _dict.get('id')) is not None: args['id'] = id else: @@ -136026,17 +137183,13 @@ def from_dict(cls, _dict: Dict) -> 'ShareAccessorBindingAccessorShareReference': if (name := _dict.get('name')) is not None: args['name'] = name else: - raise ValueError( - 'Required property \'name\' not present in ShareAccessorBindingAccessorShareReference JSON' - ) + 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' - ) + raise ValueError('Required property \'resource_type\' not present in ShareAccessorBindingAccessorShareReference JSON') return cls(**args) @classmethod @@ -136095,6 +137248,7 @@ class ResourceTypeEnum(str, Enum): SHARE = 'share' + class ShareAccessorBindingAccessorWatsonxMachineLearningReference(ShareAccessorBindingAccessor): """ ShareAccessorBindingAccessorWatsonxMachineLearningReference. @@ -136125,15 +137279,11 @@ def from_dict(cls, _dict: Dict) -> 'ShareAccessorBindingAccessorWatsonxMachineLe if (crn := _dict.get('crn')) is not None: args['crn'] = crn else: - raise ValueError( - 'Required property \'crn\' not present in ShareAccessorBindingAccessorWatsonxMachineLearningReference JSON' - ) + 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' - ) + raise ValueError('Required property \'resource_type\' not present in ShareAccessorBindingAccessorWatsonxMachineLearningReference JSON') return cls(**args) @classmethod @@ -136176,6 +137326,7 @@ class ResourceTypeEnum(str, Enum): WATSONX_MACHINE_LEARNING = 'watsonx_machine_learning' + class ShareIdentityByCRN(ShareIdentity): """ ShareIdentityByCRN. @@ -136424,9 +137575,7 @@ def from_dict(cls, _dict: Dict) -> 'ShareMountTargetPrototypeShareMountTargetByA 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 @@ -136481,6 +137630,7 @@ class TransitEncryptionEnum(str, Enum): USER_MANAGED = 'user_managed' + class ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC(ShareMountTargetPrototype): """ The VPC in which clients can mount the file share using this mount target. The VPC @@ -136539,9 +137689,7 @@ def from_dict(cls, _dict: Dict) -> 'ShareMountTargetPrototypeShareMountTargetByA if (vpc := _dict.get('vpc')) is not None: args['vpc'] = vpc else: - raise ValueError( - 'Required property \'vpc\' not present in ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC JSON' - ) + raise ValueError('Required property \'vpc\' not present in ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC JSON') return cls(**args) @classmethod @@ -136596,9 +137744,8 @@ class TransitEncryptionEnum(str, Enum): USER_MANAGED = 'user_managed' -class ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentity( - ShareMountTargetVirtualNetworkInterfacePrototype -): + +class ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentity(ShareMountTargetVirtualNetworkInterfacePrototype): """ Identifies a virtual network interface by a unique property. @@ -136613,20 +137760,12 @@ def __init__( """ # 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. @@ -136792,9 +137931,7 @@ def __init__( 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: @@ -136878,19 +138015,13 @@ 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 @@ -136913,6 +138044,7 @@ class ProtocolStateFilteringModeEnum(str, Enum): ENABLED = 'enabled' + class ShareProfileCapacityDependentRange(ShareProfileCapacity): """ The permitted total capacity (in gigabytes) of a share with this profile depends on @@ -137011,6 +138143,7 @@ class TypeEnum(str, Enum): DEPENDENT_RANGE = 'dependent_range' + class ShareProfileCapacityEnum(ShareProfileCapacity): """ The permitted total capacities (in gigabytes) of a share with this profile. @@ -137088,6 +138221,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class ShareProfileCapacityFixed(ShareProfileCapacity): """ The permitted total capacity (in gigabytes) of a share with this profile is fixed. @@ -137165,6 +138299,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class ShareProfileCapacityRange(ShareProfileCapacity): """ The permitted total capacity range (in gigabytes) of a share with this profile. @@ -137272,6 +138407,7 @@ class TypeEnum(str, Enum): RANGE = 'range' + class ShareProfileIOPSDependentRange(ShareProfileIOPS): """ The permitted IOPS range of a share with this profile depends on its configuration. @@ -137369,6 +138505,7 @@ class TypeEnum(str, Enum): DEPENDENT_RANGE = 'dependent_range' + class ShareProfileIOPSEnum(ShareProfileIOPS): """ The permitted IOPS values of a share with this profile. @@ -137456,6 +138593,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class ShareProfileIOPSFixed(ShareProfileIOPS): """ The permitted IOPS of a share with this profile is fixed. @@ -137533,6 +138671,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class ShareProfileIOPSRange(ShareProfileIOPS): """ The permitted IOPS range of a share with this profile. @@ -137640,6 +138779,7 @@ class TypeEnum(str, Enum): RANGE = 'range' + class ShareProfileIdentityByHref(ShareProfileIdentity): """ ShareProfileIdentityByHref. @@ -137915,6 +139055,7 @@ class AllowedTransitEncryptionModesEnum(str, Enum): USER_MANAGED = 'user_managed' + class SharePrototypeShareBySize(SharePrototype): """ Create a file share by size. @@ -137961,7 +139102,8 @@ class SharePrototypeShareBySize(SharePrototype): 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. + :param int size: The size of the file share (in gigabytes), excluding share + snapshots. 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 in the same region as @@ -137993,8 +139135,8 @@ def __init__( 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. + :param int size: The size of the file share (in gigabytes), excluding share + snapshots. 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 in the same region as @@ -138186,6 +139328,7 @@ class AllowedTransitEncryptionModesEnum(str, Enum): NONE = 'none' USER_MANAGED = 'user_managed' + class AccessControlModeEnum(str, Enum): """ The access control mode for the share: @@ -138201,6 +139344,7 @@ class AccessControlModeEnum(str, Enum): VPC = 'vpc' + class SharePrototypeShareBySourceShare(SharePrototype): """ Create a replica file share for an existing file share. The values for @@ -138368,9 +139512,7 @@ def from_dict(cls, _dict: Dict) -> 'SharePrototypeShareBySourceShare': 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: @@ -138422,23 +139564,281 @@ 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: - _dict['replication_cron_spec'] = self.replication_cron_spec + 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): + _dict['resource_group'] = self.resource_group + else: + _dict['resource_group'] = self.resource_group.to_dict() + if hasattr(self, 'source_share') and self.source_share is not None: + if isinstance(self.source_share, 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): + """Return a json dictionary representing this model.""" + return self.to_dict() + + def __str__(self) -> str: + """Return a `str` version of this SharePrototypeShareBySourceShare object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'SharePrototypeShareBySourceShare') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + 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 SharePrototypeShareBySourceSnapshot(SharePrototype): + """ + Create a file share from a source snapshot. The initial value for + `access_control_mode`, and the zone the file share resides in will be inherited from + `source_snapshot`. + + :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 EncryptionKeyIdentity encryption_key: (optional) The root key to use to + wrap the data encryption key for the share. + The specified key may be in a different account, subject to IAM policies. + If unspecified, the source snapshot's `encryption_key` will be used. + :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: (optional) The size to use for the file share (in gigabytes). + The specified value must be at least the snapshot's `minimum_size`, and must be + within the `size` range of the share's profile. + If unspecified, the source snapshot's `minimum_size` will be used. + :param ShareSourceSnapshotPrototype source_snapshot: The source snapshot for + this file share. + This file share will reside in the same zone as the specified source snapshot. + The snapshot must have the `lifecycle_state` as `stable` and `status` as + `available` + to be able to restore a share for it. + """ + + def __init__( + self, + profile: 'ShareProfileIdentity', + source_snapshot: 'ShareSourceSnapshotPrototype', + *, + 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, + initial_owner: Optional['ShareInitialOwner'] = None, + iops: Optional[int] = None, + resource_group: Optional['ResourceGroupIdentity'] = None, + size: Optional[int] = None, + ) -> None: + """ + Initialize a SharePrototypeShareBySourceSnapshot 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 ShareSourceSnapshotPrototype source_snapshot: The source snapshot + for this file share. + This file share will reside in the same zone as the specified source + snapshot. + The snapshot must have the `lifecycle_state` as `stable` and `status` as + `available` + to be able to restore a share for it. + :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 EncryptionKeyIdentity encryption_key: (optional) The root key to use + to wrap the data encryption key for the share. + The specified key may be in a different account, subject to IAM policies. + If unspecified, the source snapshot's `encryption_key` will be used. + :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. + :param int size: (optional) The size to use for the file share (in + gigabytes). The specified value must be at least the snapshot's + `minimum_size`, and must be within the `size` range of the share's profile. + If unspecified, the source snapshot's `minimum_size` will be used. + """ + # 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.encryption_key = encryption_key + self.initial_owner = initial_owner + self.iops = iops + self.profile = profile + self.resource_group = resource_group + self.size = size + self.source_snapshot = source_snapshot + + @classmethod + def from_dict(cls, _dict: Dict) -> 'SharePrototypeShareBySourceSnapshot': + """Initialize a SharePrototypeShareBySourceSnapshot 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 (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 SharePrototypeShareBySourceSnapshot 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 + 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 SharePrototypeShareBySourceSnapshot JSON') + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a SharePrototypeShareBySourceSnapshot 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, '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, 'initial_owner') and self.initial_owner is not None: + if isinstance(self.initial_owner, 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 else: _dict['resource_group'] = self.resource_group.to_dict() - if hasattr(self, 'source_share') and self.source_share is not None: - if isinstance(self.source_share, 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 + if hasattr(self, 'size') and self.size is not None: + _dict['size'] = self.size + 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: - _dict['zone'] = self.zone.to_dict() + _dict['source_snapshot'] = self.source_snapshot.to_dict() return _dict def _to_dict(self): @@ -138446,16 +139846,16 @@ def _to_dict(self): return self.to_dict() def __str__(self) -> str: - """Return a `str` version of this SharePrototypeShareBySourceShare object.""" + """Return a `str` version of this SharePrototypeShareBySourceSnapshot object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__(self, other: 'SharePrototypeShareBySourceShare') -> bool: + def __eq__(self, other: 'SharePrototypeShareBySourceSnapshot') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__(self, other: 'SharePrototypeShareBySourceShare') -> bool: + def __ne__(self, other: 'SharePrototypeShareBySourceSnapshot') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -138473,6 +139873,153 @@ class AllowedTransitEncryptionModesEnum(str, Enum): USER_MANAGED = 'user_managed' + +class ShareSourceSnapshotPrototypeShareSnapshotIdentity(ShareSourceSnapshotPrototype): + """ + Identifies a share snapshot by a unique property. + + """ + + def __init__( + self, + ) -> None: + """ + Initialize a ShareSourceSnapshotPrototypeShareSnapshotIdentity object. + + """ + # pylint: disable=super-init-not-called + msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( + ", ".join(['ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityById', 'ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByCRN', 'ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByHref']) + ) + raise Exception(msg) + + +class ShareSourceSnapshotShareSnapshotReference(ShareSourceSnapshot): + """ + ShareSourceSnapshotShareSnapshotReference. + + :param str crn: The CRN for this share snapshot. + :param Deleted 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 share snapshot. + :param str id: The unique identifier for this share snapshot. + :param str name: The name for this share snapshot. The name is unique across all + snapshots for the file share. + :param str resource_type: The resource type. + """ + + def __init__( + self, + crn: str, + href: str, + id: str, + name: str, + resource_type: str, + *, + deleted: Optional['Deleted'] = None, + ) -> None: + """ + Initialize a ShareSourceSnapshotShareSnapshotReference object. + + :param str crn: The CRN for this share snapshot. + :param str href: The URL for this share snapshot. + :param str id: The unique identifier for this share snapshot. + :param str name: The name for this share snapshot. The name is unique + across all snapshots for the file share. + :param str resource_type: The resource type. + :param Deleted deleted: (optional) If present, this property indicates the + referenced resource has been deleted, and provides + some supplementary information. + """ + # pylint: disable=super-init-not-called + self.crn = crn + self.deleted = deleted + self.href = href + self.id = id + self.name = name + self.resource_type = resource_type + + @classmethod + def from_dict(cls, _dict: Dict) -> 'ShareSourceSnapshotShareSnapshotReference': + """Initialize a ShareSourceSnapshotShareSnapshotReference 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 ShareSourceSnapshotShareSnapshotReference JSON') + if (deleted := _dict.get('deleted')) is not None: + args['deleted'] = Deleted.from_dict(deleted) + if (href := _dict.get('href')) is not None: + args['href'] = href + else: + raise ValueError('Required property \'href\' not present in ShareSourceSnapshotShareSnapshotReference JSON') + if (id := _dict.get('id')) is not None: + args['id'] = id + else: + raise ValueError('Required property \'id\' not present in ShareSourceSnapshotShareSnapshotReference JSON') + if (name := _dict.get('name')) is not None: + args['name'] = name + else: + raise ValueError('Required property \'name\' not present in ShareSourceSnapshotShareSnapshotReference 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 ShareSourceSnapshotShareSnapshotReference JSON') + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a ShareSourceSnapshotShareSnapshotReference 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, '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 ShareSourceSnapshotShareSnapshotReference object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'ShareSourceSnapshotShareSnapshotReference') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'ShareSourceSnapshotShareSnapshotReference') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + class ResourceTypeEnum(str, Enum): + """ + The resource type. + """ + + SHARE_SNAPSHOT = 'share_snapshot' + + + class SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots(SnapshotConsistencyGroupPrototype): """ SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots. @@ -138532,9 +140079,7 @@ def from_dict(cls, _dict: Dict) -> 'SnapshotConsistencyGroupPrototypeSnapshotCon if (snapshots := _dict.get('snapshots')) is not None: 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 @@ -138856,9 +140401,7 @@ def from_dict(cls, _dict: Dict) -> 'SnapshotPrototypeSnapshotBySourceSnapshot': if (source_snapshot := _dict.get('source_snapshot')) is not None: 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 @@ -138979,9 +140522,7 @@ 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 @@ -139399,6 +140940,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class SubnetPrototypeSubnetByTotalCount(SubnetPrototype): """ SubnetPrototypeSubnetByTotalCount. @@ -139499,9 +141041,7 @@ def from_dict(cls, _dict: Dict) -> 'SubnetPrototypeSubnetByTotalCount': 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: @@ -139580,6 +141120,7 @@ class IpVersionEnum(str, Enum): IPV4 = 'ipv4' + class SubnetPublicGatewayPatchPublicGatewayIdentityByCRN(SubnetPublicGatewayPatch): """ SubnetPublicGatewayPatchPublicGatewayIdentityByCRN. @@ -139606,9 +141147,7 @@ def from_dict(cls, _dict: Dict) -> 'SubnetPublicGatewayPatchPublicGatewayIdentit 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 @@ -139668,9 +141207,7 @@ def from_dict(cls, _dict: Dict) -> 'SubnetPublicGatewayPatchPublicGatewayIdentit 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 @@ -139730,9 +141267,7 @@ def from_dict(cls, _dict: Dict) -> 'SubnetPublicGatewayPatchPublicGatewayIdentit 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 @@ -139938,15 +141473,11 @@ def from_dict(cls, _dict: Dict) -> 'VPCDNSResolverPrototypeVPCDNSResolverTypeMan if (manual_servers := _dict.get('manual_servers')) is not None: 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 @@ -139995,6 +141526,7 @@ class TypeEnum(str, Enum): MANUAL = 'manual' + class VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototype(VPCDNSResolverPrototype): """ The system will provide DNS server addresses for this VPC. The system-provided DNS @@ -140065,6 +141597,7 @@ class TypeEnum(str, Enum): SYSTEM = 'system' + class VPCDNSResolverTypeDelegated(VPCDNSResolver): """ The DNS server addresses are delegated to the DNS resolver of another VPC. @@ -140182,6 +141715,7 @@ class TypeEnum(str, Enum): DELEGATED = 'delegated' + class VPCDNSResolverTypeManual(VPCDNSResolver): """ The DNS server addresses are manually specified. @@ -140320,6 +141854,7 @@ class TypeEnum(str, Enum): MANUAL = 'manual' + class VPCDNSResolverTypeSystem(VPCDNSResolver): """ The DNS server addresses are provided by the system and depend on the configuration. @@ -140473,6 +142008,7 @@ class ConfigurationEnum(str, Enum): DEFAULT = 'default' PRIVATE_RESOLVER = 'private_resolver' + class TypeEnum(str, Enum): """ The type of the DNS resolver used for the VPC. @@ -140481,6 +142017,7 @@ class TypeEnum(str, Enum): SYSTEM = 'system' + class VPCDNSResolverVPCPatchVPCIdentityByCRN(VPCDNSResolverVPCPatch): """ VPCDNSResolverVPCPatchVPCIdentityByCRN. @@ -140841,9 +142378,7 @@ def __ne__(self, other: 'VPCIdentityById') -> bool: return not self == other -class VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN( - VPNGatewayConnectionIKEIdentityPrototype -): +class VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN(VPNGatewayConnectionIKEIdentityPrototype): """ VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN. @@ -140873,15 +142408,11 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIKEIdentityPrototypeVPNG 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 @@ -140927,9 +142458,8 @@ class TypeEnum(str, Enum): KEY_ID = 'key_id' -class VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname( - VPNGatewayConnectionIKEIdentityPrototype -): + +class VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname(VPNGatewayConnectionIKEIdentityPrototype): """ VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname. @@ -140953,23 +142483,17 @@ 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 @@ -141015,9 +142539,8 @@ class TypeEnum(str, Enum): KEY_ID = 'key_id' -class VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4( - VPNGatewayConnectionIKEIdentityPrototype -): + +class VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4(VPNGatewayConnectionIKEIdentityPrototype): """ VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4. @@ -141047,15 +142570,11 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIKEIdentityPrototypeVPNG 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 @@ -141101,9 +142620,8 @@ class TypeEnum(str, Enum): KEY_ID = 'key_id' -class VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID( - VPNGatewayConnectionIKEIdentityPrototype -): + +class VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID(VPNGatewayConnectionIKEIdentityPrototype): """ VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID. @@ -141133,15 +142651,11 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIKEIdentityPrototypeVPNG 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 @@ -141187,6 +142701,7 @@ class TypeEnum(str, Enum): KEY_ID = 'key_id' + class VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN(VPNGatewayConnectionIKEIdentity): """ VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN. @@ -141223,15 +142738,11 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIKEIdentityVPNGatewayCon 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 @@ -141280,6 +142791,7 @@ class TypeEnum(str, Enum): KEY_ID = 'key_id' + class VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname(VPNGatewayConnectionIKEIdentity): """ VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname. @@ -141316,15 +142828,11 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIKEIdentityVPNGatewayCon 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 @@ -141373,6 +142881,7 @@ class TypeEnum(str, Enum): KEY_ID = 'key_id' + class VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4(VPNGatewayConnectionIKEIdentity): """ VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4. @@ -141409,15 +142918,11 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIKEIdentityVPNGatewayCon 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 @@ -141466,6 +142971,7 @@ class TypeEnum(str, Enum): KEY_ID = 'key_id' + class VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID(VPNGatewayConnectionIKEIdentity): """ VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID. @@ -141502,15 +143008,11 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIKEIdentityVPNGatewayCon 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 @@ -141559,6 +143061,7 @@ class TypeEnum(str, Enum): KEY_ID = 'key_id' + class VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref(VPNGatewayConnectionIKEPolicyPatch): """ VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref. @@ -141585,9 +143088,7 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIKEPolicyPatchIKEPolicyI 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 @@ -141647,9 +143148,7 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIKEPolicyPatchIKEPolicyI 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 @@ -141709,9 +143208,7 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIKEPolicyPrototypeIKEPol 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 @@ -141771,9 +143268,7 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIKEPolicyPrototypeIKEPol 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 @@ -141833,9 +143328,7 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIPsecPolicyPatchIPsecPol 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 @@ -141895,9 +143388,7 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIPsecPolicyPatchIPsecPol 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 @@ -141957,9 +143448,7 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIPsecPolicyPrototypeIPse 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 @@ -142019,9 +143508,7 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionIPsecPolicyPrototypeIPse 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 @@ -142072,12 +143559,7 @@ def __init__( """ # 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) @@ -142099,12 +143581,7 @@ def __init__( """ # 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) @@ -142251,9 +143728,7 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionPolicyMode': 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: @@ -142261,9 +143736,7 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionPolicyMode': 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: @@ -142407,6 +143880,7 @@ class AuthenticationModeEnum(str, Enum): PSK = 'psk' + class EstablishModeEnum(str, Enum): """ The establish mode of the VPN gateway connection: @@ -142424,6 +143898,7 @@ class EstablishModeEnum(str, Enum): BIDIRECTIONAL = 'bidirectional' PEER_ONLY = 'peer_only' + class ModeEnum(str, Enum): """ The mode of the VPN gateway. @@ -142435,6 +143910,7 @@ class ModeEnum(str, Enum): POLICY = 'policy' ROUTE = 'route' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -142442,6 +143918,7 @@ class ResourceTypeEnum(str, Enum): VPN_GATEWAY_CONNECTION = 'vpn_gateway_connection' + class StatusEnum(str, Enum): """ The status of a VPN gateway connection. @@ -142451,9 +143928,8 @@ class StatusEnum(str, Enum): UP = 'up' -class VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress( - VPNGatewayConnectionPolicyModePeerPrototype -): + +class VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress(VPNGatewayConnectionPolicyModePeerPrototype): """ VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByAddress. @@ -142501,17 +143977,13 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionPolicyModePeerPrototypeV 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 @@ -142552,9 +144024,7 @@ def __ne__(self, other: 'VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayCo return not self == other -class VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN( - VPNGatewayConnectionPolicyModePeerPrototype -): +class VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN(VPNGatewayConnectionPolicyModePeerPrototype): """ VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN. @@ -142601,17 +144071,13 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionPolicyModePeerPrototypeV 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 @@ -142691,27 +144157,19 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionPolicyModePeerVPNGateway 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 @@ -142762,6 +144220,7 @@ class TypeEnum(str, Enum): FQDN = 'fqdn' + class VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN(VPNGatewayConnectionPolicyModePeer): """ VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN. @@ -142800,27 +144259,19 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionPolicyModePeerVPNGateway 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 @@ -142871,6 +144322,7 @@ class TypeEnum(str, Enum): FQDN = 'fqdn' + class VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype(VPNGatewayConnectionPrototype): """ VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype. @@ -142968,21 +144420,15 @@ 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) 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 @@ -143064,6 +144510,7 @@ class EstablishModeEnum(str, Enum): PEER_ONLY = 'peer_only' + class VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype(VPNGatewayConnectionPrototype): """ VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype. @@ -143183,9 +144630,7 @@ 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 (distribute_traffic := _dict.get('distribute_traffic')) is not None: args['distribute_traffic'] = distribute_traffic if (local := _dict.get('local')) is not None: @@ -143193,9 +144638,7 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionPrototypeVPNGatewayConne 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) @@ -143282,6 +144725,7 @@ class EstablishModeEnum(str, Enum): BIDIRECTIONAL = 'bidirectional' PEER_ONLY = 'peer_only' + class RoutingProtocolEnum(str, Enum): """ Routing protocols are disabled for this VPN gateway connection. @@ -143290,6 +144734,7 @@ class RoutingProtocolEnum(str, Enum): NONE = 'none' + class VPNGatewayConnectionRouteMode(VPNGatewayConnection): """ VPNGatewayConnectionRouteMode. @@ -143424,9 +144869,7 @@ def _get_class_by_discriminator(cls, _dict: Dict) -> object: 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) @@ -143446,6 +144889,7 @@ class AuthenticationModeEnum(str, Enum): PSK = 'psk' + class EstablishModeEnum(str, Enum): """ The establish mode of the VPN gateway connection: @@ -143463,6 +144907,7 @@ class EstablishModeEnum(str, Enum): BIDIRECTIONAL = 'bidirectional' PEER_ONLY = 'peer_only' + class ModeEnum(str, Enum): """ The mode of the VPN gateway. @@ -143474,6 +144919,7 @@ class ModeEnum(str, Enum): POLICY = 'policy' ROUTE = 'route' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -143481,6 +144927,7 @@ class ResourceTypeEnum(str, Enum): VPN_GATEWAY_CONNECTION = 'vpn_gateway_connection' + class StatusEnum(str, Enum): """ The status of a VPN gateway connection. @@ -143490,9 +144937,8 @@ class StatusEnum(str, Enum): UP = 'up' -class VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress( - VPNGatewayConnectionStaticRouteModePeerPrototype -): + +class VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress(VPNGatewayConnectionStaticRouteModePeerPrototype): """ VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress. @@ -143530,9 +144976,7 @@ 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: @@ -143540,9 +144984,7 @@ def from_dict( 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 @@ -143570,24 +145012,18 @@ 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. @@ -143632,9 +145068,7 @@ 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 @@ -143708,21 +145142,15 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionStaticRouteModePeerVPNGa 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 @@ -143771,6 +145199,7 @@ class TypeEnum(str, Enum): FQDN = 'fqdn' + class VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN(VPNGatewayConnectionStaticRouteModePeer): """ VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN. @@ -143805,21 +145234,15 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionStaticRouteModePeerVPNGa 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 @@ -143868,6 +145291,7 @@ class TypeEnum(str, Enum): FQDN = 'fqdn' + class VPNGatewayPolicyMode(VPNGateway): """ VPNGatewayPolicyMode. @@ -144159,6 +145583,7 @@ class HealthStateEnum(str, Enum): INAPPLICABLE = 'inapplicable' OK = 'ok' + class LifecycleStateEnum(str, Enum): """ The lifecycle state of the VPN gateway. @@ -144172,6 +145597,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -144179,6 +145605,7 @@ class ResourceTypeEnum(str, Enum): VPN_GATEWAY = 'vpn_gateway' + class ModeEnum(str, Enum): """ Policy mode VPN gateway. @@ -144187,6 +145614,7 @@ class ModeEnum(str, Enum): POLICY = 'policy' + class VPNGatewayPrototypeVPNGatewayPolicyModePrototype(VPNGatewayPrototype): """ VPNGatewayPrototypeVPNGatewayPolicyModePrototype. @@ -144234,9 +145662,7 @@ 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) @@ -144291,6 +145717,7 @@ class ModeEnum(str, Enum): POLICY = 'policy' + class VPNGatewayPrototypeVPNGatewayRouteModePrototype(VPNGatewayPrototype): """ VPNGatewayPrototypeVPNGatewayRouteModePrototype. @@ -144338,9 +145765,7 @@ 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) @@ -144395,6 +145820,7 @@ class ModeEnum(str, Enum): ROUTE = 'route' + class VPNGatewayRouteMode(VPNGateway): """ VPNGatewayRouteMode. @@ -144686,6 +146112,7 @@ class HealthStateEnum(str, Enum): INAPPLICABLE = 'inapplicable' OK = 'ok' + class LifecycleStateEnum(str, Enum): """ The lifecycle state of the VPN gateway. @@ -144699,6 +146126,7 @@ class LifecycleStateEnum(str, Enum): UPDATING = 'updating' WAITING = 'waiting' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -144706,6 +146134,7 @@ class ResourceTypeEnum(str, Enum): VPN_GATEWAY = 'vpn_gateway' + class ModeEnum(str, Enum): """ Route mode VPN gateway. @@ -144714,6 +146143,7 @@ class ModeEnum(str, Enum): ROUTE = 'route' + class VPNServerAuthenticationByCertificate(VPNServerAuthentication): """ VPNServerAuthenticationByCertificate. @@ -144817,6 +146247,7 @@ class MethodEnum(str, Enum): USERNAME = 'username' + class VPNServerAuthenticationByUsername(VPNServerAuthentication): """ VPNServerAuthenticationByUsername. @@ -144859,9 +146290,7 @@ def from_dict(cls, _dict: Dict) -> 'VPNServerAuthenticationByUsername': 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 @@ -144911,6 +146340,7 @@ class MethodEnum(str, Enum): USERNAME = 'username' + class VPNServerAuthenticationByUsernameIdProviderByIAM(VPNServerAuthenticationByUsernameIdProvider): """ VPNServerAuthenticationByUsernameIdProviderByIAM. @@ -144947,9 +146377,7 @@ def from_dict(cls, _dict: Dict) -> 'VPNServerAuthenticationByUsernameIdProviderB 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 @@ -144994,6 +146422,7 @@ class ProviderTypeEnum(str, Enum): IAM = 'iam' + class VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype(VPNServerAuthenticationPrototype): """ VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype. @@ -145033,15 +146462,11 @@ def from_dict(cls, _dict: Dict) -> 'VPNServerAuthenticationPrototypeVPNServerAut 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) @@ -145092,6 +146517,7 @@ class MethodEnum(str, Enum): USERNAME = 'username' + class VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype(VPNServerAuthenticationPrototype): """ VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype. @@ -145124,15 +146550,11 @@ def from_dict(cls, _dict: Dict) -> 'VPNServerAuthenticationPrototypeVPNServerAut 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 @@ -145179,9 +146601,8 @@ 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. @@ -145197,19 +146618,12 @@ def __init__( """ # 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. @@ -145254,9 +146668,7 @@ 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: @@ -145291,24 +146703,18 @@ 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. @@ -145324,19 +146730,12 @@ def __init__( """ # 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. @@ -145381,9 +146780,7 @@ 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: @@ -145418,26 +146815,18 @@ 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. @@ -145474,35 +146863,25 @@ 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 @@ -145531,19 +146910,13 @@ 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 @@ -145555,9 +146928,8 @@ class ResourceTypeEnum(str, Enum): BARE_METAL_SERVER_NETWORK_ATTACHMENT = 'bare_metal_server_network_attachment' -class VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext( - VirtualNetworkInterfaceTarget -): + +class VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext(VirtualNetworkInterfaceTarget): """ VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext. @@ -145591,35 +146963,25 @@ 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 @@ -145648,17 +147010,13 @@ 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 @@ -145670,6 +147028,7 @@ class ResourceTypeEnum(str, Enum): INSTANCE_NETWORK_ATTACHMENT = 'instance_network_attachment' + class VirtualNetworkInterfaceTargetShareMountTargetReference(VirtualNetworkInterfaceTarget): """ VirtualNetworkInterfaceTargetShareMountTargetReference. @@ -145721,27 +147080,19 @@ def from_dict(cls, _dict: Dict) -> 'VirtualNetworkInterfaceTargetShareMountTarge 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 @@ -145793,6 +147144,7 @@ class ResourceTypeEnum(str, Enum): SHARE_MOUNT_TARGET = 'share_mount_target' + class VolumeAttachmentPrototypeVolumeVolumeIdentity(VolumeAttachmentPrototypeVolume): """ Identifies a volume by a unique property. @@ -145808,13 +147160,7 @@ def __init__( """ # 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) @@ -145871,12 +147217,7 @@ 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) @@ -146159,6 +147500,7 @@ class TypeEnum(str, Enum): DEPENDENT_RANGE = 'dependent_range' + class VolumeProfileBootCapacityEnum(VolumeProfileBootCapacity): """ The permitted total capacities (in gigabytes) of a boot volume with this profile. @@ -146246,6 +147588,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class VolumeProfileBootCapacityFixed(VolumeProfileBootCapacity): """ The permitted total capacity (in gigabytes) of a boot volume with this profile is @@ -146324,6 +147667,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class VolumeProfileBootCapacityRange(VolumeProfileBootCapacity): """ The permitted total capacity range (in gigabytes) of a boot volume with this profile. @@ -146431,6 +147775,7 @@ class TypeEnum(str, Enum): RANGE = 'range' + class VolumeProfileCapacityDependentRange(VolumeProfileCapacity): """ The permitted total capacity (in gigabytes) of a data volume with this profile depends @@ -146529,6 +147874,7 @@ class TypeEnum(str, Enum): DEPENDENT_RANGE = 'dependent_range' + class VolumeProfileCapacityEnum(VolumeProfileCapacity): """ The permitted total capacities (in gigabytes) of a data volume with this profile. @@ -146616,6 +147962,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class VolumeProfileCapacityFixed(VolumeProfileCapacity): """ The permitted total capacity (in gigabytes) of a data volume with this profile is @@ -146694,6 +148041,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class VolumeProfileCapacityRange(VolumeProfileCapacity): """ The permitted total capacity range (in gigabytes) of a data volume with this profile. @@ -146801,6 +148149,7 @@ class TypeEnum(str, Enum): RANGE = 'range' + class VolumeProfileIOPSDependentRange(VolumeProfileIOPS): """ The permitted IOPS range of a volume with this profile depends on its configuration. @@ -146898,6 +148247,7 @@ class TypeEnum(str, Enum): DEPENDENT_RANGE = 'dependent_range' + class VolumeProfileIOPSEnum(VolumeProfileIOPS): """ The permitted IOPS values of a volume with this profile. @@ -146985,6 +148335,7 @@ class TypeEnum(str, Enum): ENUM = 'enum' + class VolumeProfileIOPSFixed(VolumeProfileIOPS): """ The permitted IOPS of a volume with this profile is fixed. @@ -147062,6 +148413,7 @@ class TypeEnum(str, Enum): FIXED = 'fixed' + class VolumeProfileIOPSRange(VolumeProfileIOPS): """ The permitted IOPS range of a volume with this profile. @@ -147169,6 +148521,7 @@ class TypeEnum(str, Enum): RANGE = 'range' + class VolumeProfileIdentityByHref(VolumeProfileIdentity): """ VolumeProfileIdentityByHref. @@ -147560,9 +148913,7 @@ 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 @@ -147773,9 +149124,7 @@ def from_dict(cls, _dict: Dict) -> 'BackupPolicyScopePrototypeEnterpriseIdentity 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 @@ -147809,9 +149158,7 @@ def __ne__(self, other: 'BackupPolicyScopePrototypeEnterpriseIdentityEnterpriseI return not self == other -class BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN( - BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity -): +class BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity): """ BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN. @@ -147831,17 +149178,13 @@ 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 @@ -147864,26 +149207,18 @@ 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. @@ -147903,17 +149238,13 @@ 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 @@ -147936,26 +149267,18 @@ 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. @@ -147975,17 +149298,13 @@ 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 @@ -148008,26 +149327,18 @@ 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 ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref( - ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContext -): +class ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref(ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContext): """ ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref. @@ -148047,17 +149358,13 @@ def __init__( self.href = href @classmethod - def from_dict( - cls, _dict: Dict - ) -> 'ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref': + def from_dict(cls, _dict: Dict) -> 'ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref': """Initialize a ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref 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 ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref JSON' - ) + raise ValueError('Required property \'href\' not present in ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref JSON') return cls(**args) @classmethod @@ -148080,26 +149387,18 @@ def __str__(self) -> str: """Return a `str` version of this ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__( - self, - other: 'ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref', - ) -> bool: + def __eq__(self, other: 'ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__( - self, - other: 'ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref', - ) -> bool: + def __ne__(self, other: 'ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById( - ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContext -): +class ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById(ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContext): """ ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById. @@ -148121,17 +149420,13 @@ def __init__( self.id = id @classmethod - def from_dict( - cls, _dict: Dict - ) -> 'ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById': + def from_dict(cls, _dict: Dict) -> 'ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById': """Initialize a ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById 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 ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById JSON' - ) + raise ValueError('Required property \'id\' not present in ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById JSON') return cls(**args) @classmethod @@ -148154,19 +149449,13 @@ def __str__(self) -> str: """Return a `str` version of this ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__( - self, - other: 'ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById', - ) -> bool: + def __eq__(self, other: 'ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__( - self, - other: 'ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById', - ) -> bool: + def __ne__(self, other: 'ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other @@ -148197,9 +149486,7 @@ def from_dict(cls, _dict: Dict) -> 'EndpointGatewayReservedIPReservedIPIdentityB 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 @@ -148259,9 +149546,7 @@ def from_dict(cls, _dict: Dict) -> 'EndpointGatewayReservedIPReservedIPIdentityB 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 @@ -148295,9 +149580,7 @@ def __ne__(self, other: 'EndpointGatewayReservedIPReservedIPIdentityById') -> bo return not self == other -class FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref( - FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentity -): +class FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref(FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentity): """ FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref. @@ -148326,17 +149609,13 @@ 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 @@ -148359,26 +149638,18 @@ 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. @@ -148412,17 +149683,13 @@ 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 @@ -148445,26 +149712,18 @@ 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. @@ -148498,9 +149757,7 @@ def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetPatchNetworkInterfaceIdentit 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 @@ -148534,9 +149791,7 @@ def __ne__(self, other: 'FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInt return not self == other -class FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById( - FloatingIPTargetPatchNetworkInterfaceIdentity -): +class FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById(FloatingIPTargetPatchNetworkInterfaceIdentity): """ FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById. @@ -148573,9 +149828,7 @@ def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetPatchNetworkInterfaceIdentit 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 @@ -148609,9 +149862,7 @@ def __ne__(self, other: 'FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInt return not self == other -class FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN( - FloatingIPTargetPatchVirtualNetworkInterfaceIdentity -): +class FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(FloatingIPTargetPatchVirtualNetworkInterfaceIdentity): """ FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN. @@ -148631,17 +149882,13 @@ 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 @@ -148664,24 +149911,18 @@ 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. @@ -148701,17 +149942,13 @@ 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 @@ -148734,24 +149971,18 @@ 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. @@ -148771,17 +150002,13 @@ 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 @@ -148804,24 +150031,18 @@ 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. @@ -148850,19 +150071,13 @@ 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 @@ -148885,26 +150100,18 @@ 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. @@ -148938,17 +150145,13 @@ 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 @@ -148971,26 +150174,18 @@ 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. @@ -149018,17 +150213,13 @@ 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 @@ -149062,9 +150253,7 @@ def __ne__(self, other: 'FloatingIPTargetPrototypeNetworkInterfaceIdentityNetwor return not self == other -class FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById( - FloatingIPTargetPrototypeNetworkInterfaceIdentity -): +class FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById(FloatingIPTargetPrototypeNetworkInterfaceIdentity): """ FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById. @@ -149101,9 +150290,7 @@ def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetPrototypeNetworkInterfaceIde 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 @@ -149137,9 +150324,7 @@ def __ne__(self, other: 'FloatingIPTargetPrototypeNetworkInterfaceIdentityNetwor return not self == other -class FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN( - FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentity -): +class FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentity): """ FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN. @@ -149159,17 +150344,13 @@ 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 @@ -149192,24 +150373,18 @@ 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. @@ -149229,17 +150404,13 @@ 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 @@ -149262,24 +150433,18 @@ 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. @@ -149299,17 +150464,13 @@ 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 @@ -149332,24 +150493,18 @@ 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. @@ -149375,9 +150530,7 @@ def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetPrototypeInstanceIdent 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 @@ -149411,9 +150564,7 @@ def __ne__(self, other: 'FlowLogCollectorTargetPrototypeInstanceIdentityInstance return not self == other -class FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref( - FlowLogCollectorTargetPrototypeInstanceIdentity -): +class FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref(FlowLogCollectorTargetPrototypeInstanceIdentity): """ FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref. @@ -149439,9 +150590,7 @@ def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetPrototypeInstanceIdent 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 @@ -149475,9 +150624,7 @@ def __ne__(self, other: 'FlowLogCollectorTargetPrototypeInstanceIdentityInstance return not self == other -class FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById( - FlowLogCollectorTargetPrototypeInstanceIdentity -): +class FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById(FlowLogCollectorTargetPrototypeInstanceIdentity): """ FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById. @@ -149503,9 +150650,7 @@ def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetPrototypeInstanceIdent 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 @@ -149539,9 +150684,7 @@ def __ne__(self, other: 'FlowLogCollectorTargetPrototypeInstanceIdentityInstance return not self == other -class FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref( - FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentity -): +class FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref(FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentity): """ FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref. @@ -149561,17 +150704,13 @@ 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 @@ -149594,26 +150733,18 @@ 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. @@ -149633,17 +150764,13 @@ 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 @@ -149666,26 +150793,18 @@ 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. @@ -149713,17 +150832,13 @@ 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 @@ -149746,24 +150861,18 @@ 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. @@ -149794,17 +150903,13 @@ 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 @@ -149827,17 +150932,13 @@ 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 @@ -149868,9 +150969,7 @@ def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetPrototypeSubnetIdentit 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 @@ -149930,9 +151029,7 @@ def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetPrototypeSubnetIdentit 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 @@ -149992,9 +151089,7 @@ def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetPrototypeSubnetIdentit 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 @@ -150054,9 +151149,7 @@ def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetPrototypeVPCIdentityVP 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 @@ -150116,9 +151209,7 @@ def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetPrototypeVPCIdentityVP 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 @@ -150178,9 +151269,7 @@ def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetPrototypeVPCIdentityVP 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 @@ -150214,9 +151303,7 @@ def __ne__(self, other: 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityBy return not self == other -class FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN( - FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentity -): +class FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentity): """ FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN. @@ -150236,17 +151323,13 @@ 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 @@ -150269,26 +151352,18 @@ 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. @@ -150308,17 +151383,13 @@ 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 @@ -150341,26 +151412,18 @@ 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. @@ -150380,17 +151443,13 @@ 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 @@ -150413,24 +151472,18 @@ 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 InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref( - InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentity -): +class InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref(InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentity): """ InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref. @@ -150450,17 +151503,13 @@ def __init__( self.href = href @classmethod - def from_dict( - cls, _dict: Dict - ) -> 'InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref': + def from_dict(cls, _dict: Dict) -> 'InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref': """Initialize a InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref 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 InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref JSON' - ) + raise ValueError('Required property \'href\' not present in InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref JSON') return cls(**args) @classmethod @@ -150483,26 +151532,18 @@ def __str__(self) -> str: """Return a `str` version of this InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__( - self, - other: 'InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref', - ) -> bool: + def __eq__(self, other: 'InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__( - self, - other: 'InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref', - ) -> bool: + def __ne__(self, other: 'InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById( - InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentity -): +class InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById(InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentity): """ InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById. @@ -150522,17 +151563,13 @@ def __init__( self.id = id @classmethod - def from_dict( - cls, _dict: Dict - ) -> 'InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById': + def from_dict(cls, _dict: Dict) -> 'InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById': """Initialize a InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById 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 InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById JSON' - ) + raise ValueError('Required property \'id\' not present in InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById JSON') return cls(**args) @classmethod @@ -150555,26 +151592,18 @@ def __str__(self) -> str: """Return a `str` version of this InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__( - self, - other: 'InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById', - ) -> bool: + def __eq__(self, other: 'InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__( - self, - other: 'InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById', - ) -> bool: + def __ne__(self, other: 'InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec( - InstanceGroupManagerActionPrototypeScheduledActionPrototype -): +class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec(InstanceGroupManagerActionPrototypeScheduledActionPrototype): """ InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec. @@ -150605,19 +151634,12 @@ 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. @@ -150646,12 +151668,7 @@ 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) @@ -150778,63 +151795,43 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerActionScheduledActionGro 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' - ) + 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: @@ -150844,9 +151841,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerActionScheduledActionGro if (group := _dict.get('group')) is not None: 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 @@ -150915,6 +151910,7 @@ class ResourceTypeEnum(str, Enum): INSTANCE_GROUP_MANAGER_ACTION = 'instance_group_manager_action' + class StatusEnum(str, Enum): """ The status of the instance group action @@ -150934,6 +151930,7 @@ class StatusEnum(str, Enum): INCOMPATIBLE = 'incompatible' OMITTED = 'omitted' + class ActionTypeEnum(str, Enum): """ The type of action for the instance group. @@ -150942,6 +151939,7 @@ class ActionTypeEnum(str, Enum): SCHEDULED = 'scheduled' + class InstanceGroupManagerActionScheduledActionManagerTarget(InstanceGroupManagerActionScheduledAction): """ InstanceGroupManagerActionScheduledActionManagerTarget. @@ -151064,63 +152062,43 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerActionScheduledActionMan 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' - ) + 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: @@ -151130,9 +152108,7 @@ 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 @@ -151201,6 +152177,7 @@ class ResourceTypeEnum(str, Enum): INSTANCE_GROUP_MANAGER_ACTION = 'instance_group_manager_action' + class StatusEnum(str, Enum): """ The status of the instance group action @@ -151220,6 +152197,7 @@ class StatusEnum(str, Enum): INCOMPATIBLE = 'incompatible' OMITTED = 'omitted' + class ActionTypeEnum(str, Enum): """ The type of action for the instance group. @@ -151228,9 +152206,8 @@ class ActionTypeEnum(str, Enum): SCHEDULED = 'scheduled' -class InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref( - InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype -): + +class InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref(InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype): """ InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref. @@ -151273,9 +152250,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerScheduledActionManagerPr 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 @@ -151313,9 +152288,7 @@ def __ne__(self, other: 'InstanceGroupManagerScheduledActionManagerPrototypeAuto return not self == other -class InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById( - InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype -): +class InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById(InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype): """ InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById. @@ -151358,9 +152331,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerScheduledActionManagerPr 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 @@ -151398,9 +152369,7 @@ def __ne__(self, other: 'InstanceGroupManagerScheduledActionManagerPrototypeAuto return not self == other -class InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN( - InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity -): +class InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentity): """ InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN. @@ -151420,17 +152389,13 @@ 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 @@ -151453,26 +152418,18 @@ 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. @@ -151492,17 +152449,13 @@ 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 @@ -151525,26 +152478,18 @@ 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. @@ -151564,17 +152509,13 @@ 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 @@ -151597,26 +152538,18 @@ 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. @@ -151636,17 +152569,13 @@ 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 @@ -151669,24 +152598,18 @@ 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. @@ -151706,17 +152629,13 @@ 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 @@ -151739,24 +152658,18 @@ 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. @@ -151776,17 +152689,13 @@ 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 @@ -151809,24 +152718,18 @@ 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. @@ -151852,9 +152755,7 @@ def from_dict(cls, _dict: Dict) -> 'InstancePlacementTargetPatchDedicatedHostIde 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 @@ -151888,9 +152789,7 @@ def __ne__(self, other: 'InstancePlacementTargetPatchDedicatedHostIdentityDedica return not self == other -class InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref( - InstancePlacementTargetPatchDedicatedHostIdentity -): +class InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref(InstancePlacementTargetPatchDedicatedHostIdentity): """ InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref. @@ -151916,9 +152815,7 @@ def from_dict(cls, _dict: Dict) -> 'InstancePlacementTargetPatchDedicatedHostIde 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 @@ -151952,9 +152849,7 @@ def __ne__(self, other: 'InstancePlacementTargetPatchDedicatedHostIdentityDedica return not self == other -class InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById( - InstancePlacementTargetPatchDedicatedHostIdentity -): +class InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById(InstancePlacementTargetPatchDedicatedHostIdentity): """ InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById. @@ -151980,9 +152875,7 @@ def from_dict(cls, _dict: Dict) -> 'InstancePlacementTargetPatchDedicatedHostIde 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 @@ -152016,9 +152909,7 @@ def __ne__(self, other: 'InstancePlacementTargetPatchDedicatedHostIdentityDedica return not self == other -class InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN( - InstancePlacementTargetPrototypeDedicatedHostGroupIdentity -): +class InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN(InstancePlacementTargetPrototypeDedicatedHostGroupIdentity): """ InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN. @@ -152038,17 +152929,13 @@ 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 @@ -152071,24 +152958,18 @@ 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. @@ -152108,17 +152989,13 @@ 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 @@ -152141,24 +153018,18 @@ 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. @@ -152178,17 +153049,13 @@ 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 @@ -152211,24 +153078,18 @@ 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. @@ -152248,17 +153109,13 @@ 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 @@ -152292,9 +153149,7 @@ def __ne__(self, other: 'InstancePlacementTargetPrototypeDedicatedHostIdentityDe return not self == other -class InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref( - InstancePlacementTargetPrototypeDedicatedHostIdentity -): +class InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref(InstancePlacementTargetPrototypeDedicatedHostIdentity): """ InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref. @@ -152314,17 +153169,13 @@ 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 @@ -152358,9 +153209,7 @@ def __ne__(self, other: 'InstancePlacementTargetPrototypeDedicatedHostIdentityDe return not self == other -class InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById( - InstancePlacementTargetPrototypeDedicatedHostIdentity -): +class InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById(InstancePlacementTargetPrototypeDedicatedHostIdentity): """ InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById. @@ -152386,9 +153235,7 @@ def from_dict(cls, _dict: Dict) -> 'InstancePlacementTargetPrototypeDedicatedHos 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 @@ -152422,9 +153269,7 @@ def __ne__(self, other: 'InstancePlacementTargetPrototypeDedicatedHostIdentityDe return not self == other -class InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN( - InstancePlacementTargetPrototypePlacementGroupIdentity -): +class InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN(InstancePlacementTargetPrototypePlacementGroupIdentity): """ InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN. @@ -152444,17 +153289,13 @@ 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 @@ -152477,24 +153318,18 @@ 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. @@ -152514,17 +153349,13 @@ 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 @@ -152547,24 +153378,18 @@ 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. @@ -152584,17 +153409,13 @@ 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 @@ -152628,9 +153449,7 @@ def __ne__(self, other: 'InstancePlacementTargetPrototypePlacementGroupIdentityP return not self == other -class InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment( - InstancePrototypeInstanceByCatalogOffering -): +class InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment(InstancePrototypeInstanceByCatalogOffering): """ InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment. @@ -152841,18 +153660,13 @@ 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 (cluster_network_attachments := _dict.get('cluster_network_attachments')) is not None: - args['cluster_network_attachments'] = [ - InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) - for v in cluster_network_attachments - ] + args['cluster_network_attachments'] = [InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) for v in cluster_network_attachments] 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: @@ -152882,31 +153696,21 @@ def from_dict( 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 - ) + 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' - ) + 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 - ) + 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 \'primary_network_attachment\' not present in InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment JSON') return cls(**args) @classmethod @@ -153029,17 +153833,13 @@ 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 @@ -153054,9 +153854,8 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' -class InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface( - InstancePrototypeInstanceByCatalogOffering -): + +class InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface(InstancePrototypeInstanceByCatalogOffering): """ InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface. @@ -153266,18 +154065,13 @@ 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 (cluster_network_attachments := _dict.get('cluster_network_attachments')) is not None: - args['cluster_network_attachments'] = [ - InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) - for v in cluster_network_attachments - ] + args['cluster_network_attachments'] = [InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) for v in cluster_network_attachments] 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: @@ -153307,29 +154101,21 @@ def from_dict( 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 - ) + 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' - ) + raise ValueError('Required property \'primary_network_interface\' not present in InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface JSON') return cls(**args) @classmethod @@ -153452,17 +154238,13 @@ 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 @@ -153477,6 +154259,7 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' + class InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment(InstancePrototypeInstanceByImage): """ InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment. @@ -153696,10 +154479,7 @@ def from_dict(cls, _dict: Dict) -> 'InstancePrototypeInstanceByImageInstanceByIm if (availability_policy := _dict.get('availability_policy')) is not None: args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(availability_policy) if (cluster_network_attachments := _dict.get('cluster_network_attachments')) is not None: - args['cluster_network_attachments'] = [ - InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) - for v in cluster_network_attachments - ] + args['cluster_network_attachments'] = [InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) for v in cluster_network_attachments] 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: @@ -153729,31 +154509,21 @@ def from_dict(cls, _dict: Dict) -> 'InstancePrototypeInstanceByImageInstanceByIm 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 - ) + 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' - ) + 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 - ) + 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 \'primary_network_attachment\' not present in InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment JSON') return cls(**args) @classmethod @@ -153897,6 +154667,7 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' + class InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface(InstancePrototypeInstanceByImage): """ InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface. @@ -154115,10 +154886,7 @@ def from_dict(cls, _dict: Dict) -> 'InstancePrototypeInstanceByImageInstanceByIm if (availability_policy := _dict.get('availability_policy')) is not None: args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(availability_policy) if (cluster_network_attachments := _dict.get('cluster_network_attachments')) is not None: - args['cluster_network_attachments'] = [ - InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) - for v in cluster_network_attachments - ] + args['cluster_network_attachments'] = [InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) for v in cluster_network_attachments] 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: @@ -154148,29 +154916,21 @@ def from_dict(cls, _dict: Dict) -> 'InstancePrototypeInstanceByImageInstanceByIm 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 - ) + 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' - ) + raise ValueError('Required property \'primary_network_interface\' not present in InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface JSON') return cls(**args) @classmethod @@ -154314,9 +155074,8 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' -class InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment( - InstancePrototypeInstanceBySourceSnapshot -): + +class InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment(InstancePrototypeInstanceBySourceSnapshot): """ InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment. @@ -154524,18 +155283,13 @@ 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 (cluster_network_attachments := _dict.get('cluster_network_attachments')) is not None: - args['cluster_network_attachments'] = [ - InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) - for v in cluster_network_attachments - ] + args['cluster_network_attachments'] = [InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) for v in cluster_network_attachments] 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: @@ -154565,29 +155319,19 @@ def from_dict( 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 - ) + args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceBySourceSnapshotContext.from_dict(boot_volume_attachment) else: - raise ValueError( - 'Required property \'boot_volume_attachment\' not present in InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment JSON' - ) + 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' - ) + 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 - ) + 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 \'primary_network_attachment\' not present in InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment JSON') return cls(**args) @classmethod @@ -154705,17 +155449,13 @@ 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 @@ -154730,9 +155470,8 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' -class InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface( - InstancePrototypeInstanceBySourceSnapshot -): + +class InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface(InstancePrototypeInstanceBySourceSnapshot): """ InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface. @@ -154939,18 +155678,13 @@ 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 (cluster_network_attachments := _dict.get('cluster_network_attachments')) is not None: - args['cluster_network_attachments'] = [ - InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) - for v in cluster_network_attachments - ] + args['cluster_network_attachments'] = [InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) for v in cluster_network_attachments] 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: @@ -154980,27 +155714,19 @@ def from_dict( 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 - ) + args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceBySourceSnapshotContext.from_dict(boot_volume_attachment) else: - raise ValueError( - 'Required property \'boot_volume_attachment\' not present in InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface JSON' - ) + 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' - ) + raise ValueError('Required property \'primary_network_interface\' not present in InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface JSON') return cls(**args) @classmethod @@ -155118,17 +155844,13 @@ 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 @@ -155143,6 +155865,7 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' + class InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment(InstancePrototypeInstanceByVolume): """ InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment. @@ -155356,10 +156079,7 @@ def from_dict(cls, _dict: Dict) -> 'InstancePrototypeInstanceByVolumeInstanceByV if (availability_policy := _dict.get('availability_policy')) is not None: args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(availability_policy) if (cluster_network_attachments := _dict.get('cluster_network_attachments')) is not None: - args['cluster_network_attachments'] = [ - InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) - for v in cluster_network_attachments - ] + args['cluster_network_attachments'] = [InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) for v in cluster_network_attachments] 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: @@ -155389,29 +156109,19 @@ def from_dict(cls, _dict: Dict) -> 'InstancePrototypeInstanceByVolumeInstanceByV 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 - ) + args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByVolumeContext.from_dict(boot_volume_attachment) else: - raise ValueError( - 'Required property \'boot_volume_attachment\' not present in InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment JSON' - ) + 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' - ) + 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 - ) + 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 \'primary_network_attachment\' not present in InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment JSON') return cls(**args) @classmethod @@ -155550,6 +156260,7 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' + class InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface(InstancePrototypeInstanceByVolume): """ InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface. @@ -155762,10 +156473,7 @@ def from_dict(cls, _dict: Dict) -> 'InstancePrototypeInstanceByVolumeInstanceByV if (availability_policy := _dict.get('availability_policy')) is not None: args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(availability_policy) if (cluster_network_attachments := _dict.get('cluster_network_attachments')) is not None: - args['cluster_network_attachments'] = [ - InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) - for v in cluster_network_attachments - ] + args['cluster_network_attachments'] = [InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) for v in cluster_network_attachments] 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: @@ -155795,27 +156503,19 @@ def from_dict(cls, _dict: Dict) -> 'InstancePrototypeInstanceByVolumeInstanceByV 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 - ) + args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByVolumeContext.from_dict(boot_volume_attachment) else: - raise ValueError( - 'Required property \'boot_volume_attachment\' not present in InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface JSON' - ) + 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' - ) + raise ValueError('Required property \'primary_network_interface\' not present in InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface JSON') return cls(**args) @classmethod @@ -155954,9 +156654,8 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' -class InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment( - InstanceTemplatePrototypeInstanceTemplateByCatalogOffering -): + +class InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment(InstanceTemplatePrototypeInstanceTemplateByCatalogOffering): """ InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment. @@ -156165,18 +156864,13 @@ 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 (cluster_network_attachments := _dict.get('cluster_network_attachments')) is not None: - args['cluster_network_attachments'] = [ - InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) - for v in cluster_network_attachments - ] + args['cluster_network_attachments'] = [InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) for v in cluster_network_attachments] 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: @@ -156206,31 +156900,21 @@ def from_dict( 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 - ) + 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' - ) + 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 - ) + 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 \'primary_network_attachment\' not present in InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment JSON') return cls(**args) @classmethod @@ -156353,19 +157037,13 @@ 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 @@ -156380,9 +157058,8 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' -class InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface( - InstanceTemplatePrototypeInstanceTemplateByCatalogOffering -): + +class InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface(InstanceTemplatePrototypeInstanceTemplateByCatalogOffering): """ InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface. @@ -156590,18 +157267,13 @@ 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 (cluster_network_attachments := _dict.get('cluster_network_attachments')) is not None: - args['cluster_network_attachments'] = [ - InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) - for v in cluster_network_attachments - ] + args['cluster_network_attachments'] = [InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) for v in cluster_network_attachments] 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: @@ -156631,29 +157303,21 @@ def from_dict( 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 - ) + 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' - ) + raise ValueError('Required property \'primary_network_interface\' not present in InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface JSON') return cls(**args) @classmethod @@ -156776,19 +157440,13 @@ 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 @@ -156803,9 +157461,8 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' -class InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment( - InstanceTemplatePrototypeInstanceTemplateByImage -): + +class InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment(InstanceTemplatePrototypeInstanceTemplateByImage): """ InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment. @@ -157016,18 +157673,13 @@ 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 (cluster_network_attachments := _dict.get('cluster_network_attachments')) is not None: - args['cluster_network_attachments'] = [ - InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) - for v in cluster_network_attachments - ] + args['cluster_network_attachments'] = [InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) for v in cluster_network_attachments] 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: @@ -157057,31 +157709,21 @@ def from_dict( 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 - ) + 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' - ) + 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 - ) + 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 \'primary_network_attachment\' not present in InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment JSON') return cls(**args) @classmethod @@ -157204,19 +157846,13 @@ 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 @@ -157231,9 +157867,8 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' -class InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface( - InstanceTemplatePrototypeInstanceTemplateByImage -): + +class InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface(InstanceTemplatePrototypeInstanceTemplateByImage): """ InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface. @@ -157443,18 +158078,13 @@ 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 (cluster_network_attachments := _dict.get('cluster_network_attachments')) is not None: - args['cluster_network_attachments'] = [ - InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) - for v in cluster_network_attachments - ] + args['cluster_network_attachments'] = [InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) for v in cluster_network_attachments] 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: @@ -157484,29 +158114,21 @@ def from_dict( 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 - ) + 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' - ) + raise ValueError('Required property \'primary_network_interface\' not present in InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface JSON') return cls(**args) @classmethod @@ -157629,17 +158251,13 @@ 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 @@ -157654,9 +158272,8 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' -class InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment( - InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot -): + +class InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment(InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot): """ InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment. @@ -157862,18 +158479,13 @@ 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 (cluster_network_attachments := _dict.get('cluster_network_attachments')) is not None: - args['cluster_network_attachments'] = [ - InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) - for v in cluster_network_attachments - ] + args['cluster_network_attachments'] = [InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) for v in cluster_network_attachments] 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: @@ -157903,29 +158515,19 @@ def from_dict( 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 - ) + args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceBySourceSnapshotContext.from_dict(boot_volume_attachment) else: - raise ValueError( - 'Required property \'boot_volume_attachment\' not present in InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment JSON' - ) + 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' - ) + 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 - ) + 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 \'primary_network_attachment\' not present in InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment JSON') return cls(**args) @classmethod @@ -158043,19 +158645,13 @@ 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 @@ -158070,9 +158666,8 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' -class InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface( - InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot -): + +class InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface(InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot): """ InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface. @@ -158277,18 +158872,13 @@ 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 (cluster_network_attachments := _dict.get('cluster_network_attachments')) is not None: - args['cluster_network_attachments'] = [ - InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) - for v in cluster_network_attachments - ] + args['cluster_network_attachments'] = [InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) for v in cluster_network_attachments] 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: @@ -158318,27 +158908,19 @@ def from_dict( 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 - ) + args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceBySourceSnapshotContext.from_dict(boot_volume_attachment) else: - raise ValueError( - 'Required property \'boot_volume_attachment\' not present in InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface JSON' - ) + 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' - ) + raise ValueError('Required property \'primary_network_interface\' not present in InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface JSON') return cls(**args) @classmethod @@ -158456,19 +159038,13 @@ 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 @@ -158483,9 +159059,8 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' -class InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment( - InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext -): + +class InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment(InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext): """ InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment. @@ -158712,32 +159287,23 @@ 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 (cluster_network_attachments := _dict.get('cluster_network_attachments')) is not None: - args['cluster_network_attachments'] = [ - InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) - for v in cluster_network_attachments - ] + args['cluster_network_attachments'] = [InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) for v in cluster_network_attachments] 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' - ) + 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: @@ -158745,15 +159311,11 @@ def from_dict( 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: @@ -158761,9 +159323,7 @@ def from_dict( 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: @@ -158773,9 +159333,7 @@ def from_dict( if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = ResourceGroupReference.from_dict(resource_group) else: - raise ValueError( - 'Required property \'resource_group\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment JSON' - ) + 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: @@ -158785,31 +159343,21 @@ def from_dict( 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 - ) + 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' - ) + 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 - ) + 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 \'primary_network_attachment\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment JSON') return cls(**args) @classmethod @@ -158940,19 +159488,13 @@ 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 @@ -158967,9 +159509,8 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' -class InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface( - InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext -): + +class InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface(InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext): """ InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface. @@ -159195,32 +159736,23 @@ 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 (cluster_network_attachments := _dict.get('cluster_network_attachments')) is not None: - args['cluster_network_attachments'] = [ - InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) - for v in cluster_network_attachments - ] + args['cluster_network_attachments'] = [InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) for v in cluster_network_attachments] 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' - ) + 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: @@ -159228,15 +159760,11 @@ def from_dict( 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: @@ -159244,9 +159772,7 @@ def from_dict( 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: @@ -159256,9 +159782,7 @@ def from_dict( if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = ResourceGroupReference.from_dict(resource_group) else: - raise ValueError( - 'Required property \'resource_group\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface JSON' - ) + 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: @@ -159268,29 +159792,21 @@ def from_dict( 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 - ) + 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' - ) + raise ValueError('Required property \'primary_network_interface\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface JSON') return cls(**args) @classmethod @@ -159421,19 +159937,13 @@ 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 @@ -159448,9 +159958,8 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' -class InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment( - InstanceTemplateInstanceByImageInstanceTemplateContext -): + +class InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment(InstanceTemplateInstanceByImageInstanceTemplateContext): """ InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment. @@ -159679,32 +160188,23 @@ 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 (cluster_network_attachments := _dict.get('cluster_network_attachments')) is not None: - args['cluster_network_attachments'] = [ - InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) - for v in cluster_network_attachments - ] + args['cluster_network_attachments'] = [InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) for v in cluster_network_attachments] 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' - ) + 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: @@ -159712,15 +160212,11 @@ def from_dict( 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: @@ -159728,9 +160224,7 @@ def from_dict( 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: @@ -159740,9 +160234,7 @@ def from_dict( if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = ResourceGroupReference.from_dict(resource_group) else: - raise ValueError( - 'Required property \'resource_group\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment JSON' - ) + 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: @@ -159752,31 +160244,21 @@ def from_dict( 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 - ) + 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' - ) + 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 - ) + 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 \'primary_network_attachment\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment JSON') return cls(**args) @classmethod @@ -159907,19 +160389,13 @@ 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 @@ -159934,9 +160410,8 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' -class InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface( - InstanceTemplateInstanceByImageInstanceTemplateContext -): + +class InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface(InstanceTemplateInstanceByImageInstanceTemplateContext): """ InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface. @@ -160164,32 +160639,23 @@ 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 (cluster_network_attachments := _dict.get('cluster_network_attachments')) is not None: - args['cluster_network_attachments'] = [ - InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) - for v in cluster_network_attachments - ] + args['cluster_network_attachments'] = [InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) for v in cluster_network_attachments] 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' - ) + 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: @@ -160197,15 +160663,11 @@ def from_dict( 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: @@ -160213,9 +160675,7 @@ def from_dict( 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: @@ -160225,9 +160685,7 @@ def from_dict( if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = ResourceGroupReference.from_dict(resource_group) else: - raise ValueError( - 'Required property \'resource_group\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface JSON' - ) + 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: @@ -160237,29 +160695,21 @@ def from_dict( 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 - ) + 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' - ) + raise ValueError('Required property \'primary_network_interface\' not present in InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface JSON') return cls(**args) @classmethod @@ -160390,19 +160840,13 @@ 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 @@ -160417,9 +160861,8 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' -class InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment( - InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext -): + +class InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment(InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext): """ InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment. @@ -160649,32 +161092,23 @@ 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 (cluster_network_attachments := _dict.get('cluster_network_attachments')) is not None: - args['cluster_network_attachments'] = [ - InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) - for v in cluster_network_attachments - ] + args['cluster_network_attachments'] = [InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) for v in cluster_network_attachments] 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' - ) + 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: @@ -160682,15 +161116,11 @@ def from_dict( 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: @@ -160698,9 +161128,7 @@ def from_dict( 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: @@ -160710,9 +161138,7 @@ def from_dict( if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = ResourceGroupReference.from_dict(resource_group) else: - raise ValueError( - 'Required property \'resource_group\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment JSON' - ) + 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: @@ -160722,31 +161148,21 @@ def from_dict( 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 - ) + args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceBySourceSnapshotContext.from_dict(boot_volume_attachment) else: - raise ValueError( - 'Required property \'boot_volume_attachment\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment JSON' - ) + 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] if (zone := _dict.get('zone')) is not None: args['zone'] = zone else: - raise ValueError( - 'Required property \'zone\' 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 - ) + 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 \'primary_network_attachment\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment JSON') return cls(**args) @classmethod @@ -160880,19 +161296,13 @@ 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 @@ -160907,9 +161317,8 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' -class InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface( - InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext -): + +class InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface(InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext): """ InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface. @@ -161146,32 +161555,23 @@ 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 (cluster_network_attachments := _dict.get('cluster_network_attachments')) is not None: - args['cluster_network_attachments'] = [ - InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) - for v in cluster_network_attachments - ] + args['cluster_network_attachments'] = [InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(v) for v in cluster_network_attachments] 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' - ) + 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: @@ -161179,15 +161579,11 @@ def from_dict( 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: @@ -161195,9 +161591,7 @@ def from_dict( 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: @@ -161207,9 +161601,7 @@ def from_dict( if (resource_group := _dict.get('resource_group')) is not None: args['resource_group'] = ResourceGroupReference.from_dict(resource_group) else: - raise ValueError( - 'Required property \'resource_group\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface JSON' - ) + 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: @@ -161219,33 +161611,23 @@ def from_dict( 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 - ) + args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceBySourceSnapshotContext.from_dict(boot_volume_attachment) else: - raise ValueError( - 'Required property \'boot_volume_attachment\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface JSON' - ) + 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 - ) + 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' - ) + raise ValueError('Required property \'primary_network_interface\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface JSON') return cls(**args) @classmethod @@ -161384,19 +161766,13 @@ 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 @@ -161411,9 +161787,8 @@ class ConfidentialComputeModeEnum(str, Enum): SGX = 'sgx' -class LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref( - LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity -): + +class LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref(LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity): """ LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref. @@ -161433,17 +161808,13 @@ 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 @@ -161466,26 +161837,18 @@ 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. @@ -161505,17 +161868,13 @@ 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 @@ -161538,26 +161897,18 @@ 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. @@ -161577,17 +161928,13 @@ 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 @@ -161610,26 +161957,18 @@ 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. @@ -161649,17 +161988,13 @@ 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 @@ -161682,26 +162017,18 @@ 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. @@ -161727,9 +162054,7 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolMemberTargetPrototypeInstanc 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 @@ -161763,9 +162088,7 @@ def __ne__(self, other: 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityIn return not self == other -class LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref( - LoadBalancerPoolMemberTargetPrototypeInstanceIdentity -): +class LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref(LoadBalancerPoolMemberTargetPrototypeInstanceIdentity): """ LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref. @@ -161791,9 +162114,7 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolMemberTargetPrototypeInstanc 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 @@ -161827,9 +162148,7 @@ def __ne__(self, other: 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityIn return not self == other -class LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById( - LoadBalancerPoolMemberTargetPrototypeInstanceIdentity -): +class LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById(LoadBalancerPoolMemberTargetPrototypeInstanceIdentity): """ LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById. @@ -161855,9 +162174,7 @@ def from_dict(cls, _dict: Dict) -> 'LoadBalancerPoolMemberTargetPrototypeInstanc 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 @@ -161917,9 +162234,7 @@ def from_dict(cls, _dict: Dict) -> 'NetworkInterfaceIPPrototypeReservedIPIdentit 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 @@ -161979,9 +162294,7 @@ def from_dict(cls, _dict: Dict) -> 'NetworkInterfaceIPPrototypeReservedIPIdentit 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 @@ -162015,9 +162328,7 @@ def __ne__(self, other: 'NetworkInterfaceIPPrototypeReservedIPIdentityById') -> return not self == other -class PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress( - PublicGatewayFloatingIPPrototypeFloatingIPIdentity -): +class PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress(PublicGatewayFloatingIPPrototypeFloatingIPIdentity): """ PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress. @@ -162043,9 +162354,7 @@ def from_dict(cls, _dict: Dict) -> 'PublicGatewayFloatingIPPrototypeFloatingIPId 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 @@ -162079,9 +162388,7 @@ def __ne__(self, other: 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloat return not self == other -class PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN( - PublicGatewayFloatingIPPrototypeFloatingIPIdentity -): +class PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN(PublicGatewayFloatingIPPrototypeFloatingIPIdentity): """ PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN. @@ -162107,9 +162414,7 @@ def from_dict(cls, _dict: Dict) -> 'PublicGatewayFloatingIPPrototypeFloatingIPId 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 @@ -162143,9 +162448,7 @@ def __ne__(self, other: 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloat return not self == other -class PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref( - PublicGatewayFloatingIPPrototypeFloatingIPIdentity -): +class PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref(PublicGatewayFloatingIPPrototypeFloatingIPIdentity): """ PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref. @@ -162171,9 +162474,7 @@ def from_dict(cls, _dict: Dict) -> 'PublicGatewayFloatingIPPrototypeFloatingIPId 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 @@ -162207,9 +162508,7 @@ def __ne__(self, other: 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloat return not self == other -class PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById( - PublicGatewayFloatingIPPrototypeFloatingIPIdentity -): +class PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById(PublicGatewayFloatingIPPrototypeFloatingIPIdentity): """ PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById. @@ -162235,9 +162534,7 @@ def from_dict(cls, _dict: Dict) -> 'PublicGatewayFloatingIPPrototypeFloatingIPId 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 @@ -162271,9 +162568,7 @@ def __ne__(self, other: 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloat return not self == other -class ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN( - ReservedIPTargetPrototypeEndpointGatewayIdentity -): +class ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN(ReservedIPTargetPrototypeEndpointGatewayIdentity): """ ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN. @@ -162299,9 +162594,7 @@ def from_dict(cls, _dict: Dict) -> 'ReservedIPTargetPrototypeEndpointGatewayIden 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 @@ -162335,9 +162628,7 @@ def __ne__(self, other: 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpoin return not self == other -class ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref( - ReservedIPTargetPrototypeEndpointGatewayIdentity -): +class ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref(ReservedIPTargetPrototypeEndpointGatewayIdentity): """ ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref. @@ -162363,9 +162654,7 @@ def from_dict(cls, _dict: Dict) -> 'ReservedIPTargetPrototypeEndpointGatewayIden 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 @@ -162399,9 +162688,7 @@ def __ne__(self, other: 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpoin return not self == other -class ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById( - ReservedIPTargetPrototypeEndpointGatewayIdentity -): +class ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById(ReservedIPTargetPrototypeEndpointGatewayIdentity): """ ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById. @@ -162427,9 +162714,7 @@ def from_dict(cls, _dict: Dict) -> 'ReservedIPTargetPrototypeEndpointGatewayIden 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 @@ -162463,9 +162748,7 @@ def __ne__(self, other: 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpoin return not self == other -class ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN( - ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentity -): +class ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentity): """ ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN. @@ -162485,17 +162768,13 @@ 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 @@ -162518,24 +162797,18 @@ 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. @@ -162555,17 +162828,13 @@ 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 @@ -162588,24 +162857,18 @@ 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. @@ -162625,17 +162888,13 @@ 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 @@ -162658,17 +162917,13 @@ 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 @@ -162705,9 +162960,7 @@ def from_dict(cls, _dict: Dict) -> 'RouteNextHopPatchRouteNextHopIPRouteNextHopI 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 @@ -162781,9 +163034,7 @@ def from_dict(cls, _dict: Dict) -> 'RouteNextHopPatchRouteNextHopIPRouteNextHopI 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 @@ -162817,9 +163068,7 @@ def __ne__(self, other: 'RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP' return not self == other -class RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref( - RouteNextHopPatchVPNGatewayConnectionIdentity -): +class RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref(RouteNextHopPatchVPNGatewayConnectionIdentity): """ RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref. @@ -162839,17 +163088,13 @@ 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 @@ -162883,9 +163128,7 @@ def __ne__(self, other: 'RouteNextHopPatchVPNGatewayConnectionIdentityVPNGateway return not self == other -class RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById( - RouteNextHopPatchVPNGatewayConnectionIdentity -): +class RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById(RouteNextHopPatchVPNGatewayConnectionIdentity): """ RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById. @@ -162911,9 +163154,7 @@ def from_dict(cls, _dict: Dict) -> 'RouteNextHopPatchVPNGatewayConnectionIdentit 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 @@ -162979,9 +163220,7 @@ def from_dict(cls, _dict: Dict) -> 'RouteNextHopPrototypeRouteNextHopIPRouteNext if (address := _dict.get('address')) is not None: args['address'] = address else: - raise ValueError( - 'Required property \'address\' not present in RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP JSON' - ) + raise ValueError('Required property \'address\' not present in RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP JSON') return cls(**args) @classmethod @@ -163055,9 +163294,7 @@ def from_dict(cls, _dict: Dict) -> 'RouteNextHopPrototypeRouteNextHopIPRouteNext if (address := _dict.get('address')) is not None: args['address'] = address else: - raise ValueError( - 'Required property \'address\' not present in RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP JSON' - ) + raise ValueError('Required property \'address\' not present in RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP JSON') return cls(**args) @classmethod @@ -163091,9 +163328,7 @@ def __ne__(self, other: 'RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicas return not self == other -class RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref( - RouteNextHopPrototypeVPNGatewayConnectionIdentity -): +class RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref(RouteNextHopPrototypeVPNGatewayConnectionIdentity): """ RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref. @@ -163113,17 +163348,13 @@ def __init__( self.href = href @classmethod - def from_dict( - cls, _dict: Dict - ) -> 'RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref': + def from_dict(cls, _dict: Dict) -> 'RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref': """Initialize a RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref 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 RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref JSON' - ) + raise ValueError('Required property \'href\' not present in RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref JSON') return cls(**args) @classmethod @@ -163146,24 +163377,18 @@ def __str__(self) -> str: """Return a `str` version of this RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__( - self, other: 'RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref' - ) -> bool: + def __eq__(self, other: 'RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__( - self, other: 'RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref' - ) -> bool: + def __ne__(self, other: 'RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById( - RouteNextHopPrototypeVPNGatewayConnectionIdentity -): +class RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById(RouteNextHopPrototypeVPNGatewayConnectionIdentity): """ RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById. @@ -163183,17 +163408,13 @@ def __init__( self.id = id @classmethod - def from_dict( - cls, _dict: Dict - ) -> 'RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById': + def from_dict(cls, _dict: Dict) -> 'RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById': """Initialize a RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById 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 RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById JSON' - ) + raise ValueError('Required property \'id\' not present in RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById JSON') return cls(**args) @classmethod @@ -163216,24 +163437,18 @@ def __str__(self) -> str: """Return a `str` version of this RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__( - self, other: 'RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById' - ) -> bool: + def __eq__(self, other: 'RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__( - self, other: 'RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById' - ) -> bool: + def __ne__(self, other: 'RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN( - SecurityGroupRuleRemotePatchSecurityGroupIdentity -): +class SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN(SecurityGroupRuleRemotePatchSecurityGroupIdentity): """ SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN. @@ -163259,9 +163474,7 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleRemotePatchSecurityGroupIde 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 @@ -163295,9 +163508,7 @@ def __ne__(self, other: 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecuri return not self == other -class SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref( - SecurityGroupRuleRemotePatchSecurityGroupIdentity -): +class SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref(SecurityGroupRuleRemotePatchSecurityGroupIdentity): """ SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref. @@ -163323,9 +163534,7 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleRemotePatchSecurityGroupIde 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 @@ -163359,9 +163568,7 @@ def __ne__(self, other: 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecuri return not self == other -class SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById( - SecurityGroupRuleRemotePatchSecurityGroupIdentity -): +class SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById(SecurityGroupRuleRemotePatchSecurityGroupIdentity): """ SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById. @@ -163387,9 +163594,7 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleRemotePatchSecurityGroupIde 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 @@ -163423,9 +163628,7 @@ def __ne__(self, other: 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecuri return not self == other -class SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN( - SecurityGroupRuleRemotePrototypeSecurityGroupIdentity -): +class SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN(SecurityGroupRuleRemotePrototypeSecurityGroupIdentity): """ SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN. @@ -163445,17 +163648,13 @@ 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 @@ -163489,9 +163688,7 @@ def __ne__(self, other: 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySe return not self == other -class SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref( - SecurityGroupRuleRemotePrototypeSecurityGroupIdentity -): +class SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref(SecurityGroupRuleRemotePrototypeSecurityGroupIdentity): """ SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref. @@ -163511,17 +163708,13 @@ 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 @@ -163555,9 +163748,7 @@ def __ne__(self, other: 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySe return not self == other -class SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById( - SecurityGroupRuleRemotePrototypeSecurityGroupIdentity -): +class SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById(SecurityGroupRuleRemotePrototypeSecurityGroupIdentity): """ SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById. @@ -163583,9 +163774,7 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupRuleRemotePrototypeSecurityGrou 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 @@ -163619,9 +163808,7 @@ def __ne__(self, other: 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySe return not self == other -class ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN( - ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentity -): +class ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN(ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentity): """ ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN. @@ -163641,17 +163828,13 @@ 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 @@ -163674,26 +163857,18 @@ 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. @@ -163713,17 +163888,13 @@ 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 @@ -163746,26 +163917,18 @@ 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. @@ -163785,17 +163948,13 @@ 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 @@ -163818,26 +163977,198 @@ def __str__(self) -> str: """Return a `str` version of this ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById object.""" return json.dumps(self.to_dict(), indent=2) - def __eq__( + 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: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + +class ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByCRN(ShareSourceSnapshotPrototypeShareSnapshotIdentity): + """ + ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByCRN. + + :param str crn: The CRN for this share snapshot. + """ + + def __init__( + self, + crn: str, + ) -> None: + """ + Initialize a ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByCRN object. + + :param str crn: The CRN for this share snapshot. + """ + # pylint: disable=super-init-not-called + self.crn = crn + + @classmethod + def from_dict(cls, _dict: Dict) -> 'ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByCRN': + """Initialize a ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByCRN 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 ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByCRN JSON') + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByCRN 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 ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByCRN object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByCRN') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByCRN') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + +class ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByHref(ShareSourceSnapshotPrototypeShareSnapshotIdentity): + """ + ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByHref. + + :param str href: The URL for this share snapshot. + """ + + def __init__( self, - other: 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById', - ) -> bool: + href: str, + ) -> None: + """ + Initialize a ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByHref object. + + :param str href: The URL for this share snapshot. + """ + # pylint: disable=super-init-not-called + self.href = href + + @classmethod + def from_dict(cls, _dict: Dict) -> 'ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByHref': + """Initialize a ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByHref 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 ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByHref JSON') + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByHref 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 ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByHref object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByHref') -> bool: """Return `true` when self and other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ - def __ne__( + def __ne__(self, other: 'ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByHref') -> bool: + """Return `true` when self and other are not equal, false otherwise.""" + return not self == other + + +class ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityById(ShareSourceSnapshotPrototypeShareSnapshotIdentity): + """ + ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityById. + + :param str id: The unique identifier for this share snapshot. + """ + + def __init__( self, - other: 'ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById', - ) -> bool: + id: str, + ) -> None: + """ + Initialize a ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityById object. + + :param str id: The unique identifier for this share snapshot. + """ + # pylint: disable=super-init-not-called + self.id = id + + @classmethod + def from_dict(cls, _dict: Dict) -> 'ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityById': + """Initialize a ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityById 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 ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityById JSON') + return cls(**args) + + @classmethod + def _from_dict(cls, _dict): + """Initialize a ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityById 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, 'id') and self.id is not None: + _dict['id'] = self.id + 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 ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityById object.""" + return json.dumps(self.to_dict(), indent=2) + + def __eq__(self, other: 'ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityById') -> bool: + """Return `true` when self and other are equal, false otherwise.""" + if not isinstance(other, self.__class__): + return False + return self.__dict__ == other.__dict__ + + def __ne__(self, other: 'ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityById') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other -class VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch( - VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch -): +class VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch(VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch): """ VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch. @@ -163860,9 +164191,7 @@ 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: @@ -163889,26 +164218,18 @@ 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. @@ -163931,9 +164252,7 @@ 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: @@ -163960,26 +164279,18 @@ 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. @@ -164002,9 +164313,7 @@ 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: @@ -164031,26 +164340,18 @@ 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. @@ -164073,9 +164374,7 @@ 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: @@ -164102,19 +164401,13 @@ 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 @@ -164280,45 +164573,31 @@ def from_dict(cls, _dict: Dict) -> 'VPNGatewayConnectionRouteModeVPNGatewayConne 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' - ) + 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' - ) + 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: @@ -164326,69 +164605,47 @@ 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] else: - raise ValueError( - 'Required property \'status_reasons\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON' - ) + raise ValueError('Required property \'status_reasons\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON') if (distribute_traffic := _dict.get('distribute_traffic')) is not None: args['distribute_traffic'] = distribute_traffic else: - raise ValueError( - 'Required property \'distribute_traffic\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON' - ) + raise ValueError('Required property \'distribute_traffic\' not present in VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode JSON') if (local := _dict.get('local')) is not None: 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] 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 @@ -164496,6 +164753,7 @@ class AuthenticationModeEnum(str, Enum): PSK = 'psk' + class EstablishModeEnum(str, Enum): """ The establish mode of the VPN gateway connection: @@ -164513,6 +164771,7 @@ class EstablishModeEnum(str, Enum): BIDIRECTIONAL = 'bidirectional' PEER_ONLY = 'peer_only' + class ModeEnum(str, Enum): """ The mode of the VPN gateway. @@ -164524,6 +164783,7 @@ class ModeEnum(str, Enum): POLICY = 'policy' ROUTE = 'route' + class ResourceTypeEnum(str, Enum): """ The resource type. @@ -164531,6 +164791,7 @@ class ResourceTypeEnum(str, Enum): VPN_GATEWAY_CONNECTION = 'vpn_gateway_connection' + class StatusEnum(str, Enum): """ The status of a VPN gateway connection. @@ -164539,6 +164800,7 @@ class StatusEnum(str, Enum): DOWN = 'down' UP = 'up' + class RoutingProtocolEnum(str, Enum): """ Routing protocols are disabled for this VPN gateway connection. @@ -164547,9 +164809,8 @@ class RoutingProtocolEnum(str, Enum): NONE = 'none' -class VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref( - VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContext -): + +class VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref(VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContext): """ VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref. @@ -164569,17 +164830,13 @@ 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 @@ -164602,24 +164859,18 @@ 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. @@ -164639,17 +164890,13 @@ 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 @@ -164672,24 +164919,18 @@ 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. @@ -164709,17 +164950,13 @@ 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 @@ -164742,26 +164979,18 @@ 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. @@ -164781,17 +165010,13 @@ 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 @@ -164814,19 +165039,13 @@ 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 @@ -164857,9 +165076,7 @@ def from_dict(cls, _dict: Dict) -> 'VolumeAttachmentPrototypeVolumeVolumeIdentit 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 @@ -164919,9 +165136,7 @@ def from_dict(cls, _dict: Dict) -> 'VolumeAttachmentPrototypeVolumeVolumeIdentit 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 @@ -164981,9 +165196,7 @@ def from_dict(cls, _dict: Dict) -> 'VolumeAttachmentPrototypeVolumeVolumeIdentit 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 @@ -165017,9 +165230,7 @@ def __ne__(self, other: 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIden return not self == other -class VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity( - VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext -): +class VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity(VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext): """ VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity. @@ -165091,9 +165302,7 @@ 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: @@ -165103,9 +165312,7 @@ def from_dict( 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: @@ -165113,9 +165320,7 @@ def from_dict( 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) @@ -165161,26 +165366,18 @@ 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. @@ -165267,9 +165464,7 @@ 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: @@ -165279,9 +165474,7 @@ def from_dict( 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: @@ -165293,9 +165486,7 @@ def from_dict( 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 @@ -165344,26 +165535,18 @@ 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. @@ -165411,9 +165594,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerActionPrototypeScheduled if (group := _dict.get('group')) is not None: 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 @@ -165454,9 +165635,7 @@ def __ne__(self, other: 'InstanceGroupManagerActionPrototypeScheduledActionProto return not self == other -class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager( - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec -): +class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec): """ InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager. @@ -165504,9 +165683,7 @@ 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 @@ -165547,9 +165724,7 @@ def __ne__(self, other: 'InstanceGroupManagerActionPrototypeScheduledActionProto return not self == other -class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup( - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt -): +class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt): """ InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup. @@ -165595,9 +165770,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceGroupManagerActionPrototypeScheduled if (group := _dict.get('group')) is not None: 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 @@ -165638,9 +165811,7 @@ def __ne__(self, other: 'InstanceGroupManagerActionPrototypeScheduledActionProto return not self == other -class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager( - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt -): +class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt): """ InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager. @@ -165686,9 +165857,7 @@ 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 @@ -165728,7 +165897,6 @@ def __ne__(self, other: 'InstanceGroupManagerActionPrototypeScheduledActionProto """Return `true` when self and other are not equal, false otherwise.""" return not self == other - ############################################################################## # Pagers ############################################################################## @@ -166635,6 +166803,7 @@ def __init__( placement_group_id: str = None, placement_group_crn: str = None, placement_group_name: str = None, + reservation_affinity_policy: str = None, reservation_id: str = None, reservation_crn: str = None, reservation_name: str = None, @@ -166675,6 +166844,9 @@ def __init__( :param str placement_group_name: (optional) Filters the collection to resources with a `placement_target.name` property matching the exact specified placement group name. + :param str reservation_affinity_policy: (optional) Filters the collection + to instances with a `reservation_affinity.policy` property matching the + specified value. :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 @@ -166703,6 +166875,7 @@ def __init__( self._placement_group_id = placement_group_id self._placement_group_crn = placement_group_crn self._placement_group_name = placement_group_name + self._reservation_affinity_policy = reservation_affinity_policy self._reservation_id = reservation_id self._reservation_crn = reservation_crn self._reservation_name = reservation_name @@ -166738,6 +166911,7 @@ def get_next(self) -> List[dict]: placement_group_id=self._placement_group_id, placement_group_crn=self._placement_group_crn, placement_group_name=self._placement_group_name, + reservation_affinity_policy=self._reservation_affinity_policy, reservation_id=self._reservation_id, reservation_crn=self._reservation_crn, reservation_name=self._reservation_name, @@ -167268,6 +167442,8 @@ def __init__( client: VpcV1, limit: int = None, name: str = None, + profile_resource_type: str = None, + affinity_policy: str = None, resource_group_id: str = None, zone_name: str = None, ) -> None: @@ -167276,6 +167452,12 @@ def __init__( :param int limit: (optional) The number of resources to return on a page. :param str name: (optional) Filters the collection to resources with a `name` property matching the exact specified name. + :param str profile_resource_type: (optional) Filters the collection of + resources with a `profile.resource_type` property matching the specified + value. + :param str affinity_policy: (optional) Filters the collection to + reservations with an `affinity_policy` property matching the specified + value. :param str resource_group_id: (optional) Filters the collection to resources with a `resource_group.id` property matching the specified identifier. @@ -167287,6 +167469,8 @@ def __init__( self._page_context = {'next': None} self._limit = limit self._name = name + self._profile_resource_type = profile_resource_type + self._affinity_policy = affinity_policy self._resource_group_id = resource_group_id self._zone_name = zone_name @@ -167308,6 +167492,8 @@ def get_next(self) -> List[dict]: result = self._client.list_reservations( limit=self._limit, name=self._name, + profile_resource_type=self._profile_resource_type, + affinity_policy=self._affinity_policy, resource_group_id=self._resource_group_id, zone_name=self._zone_name, start=self._page_context.get('next'), @@ -167707,6 +167893,9 @@ def __init__( limit: int = None, resource_group_id: str = None, name: str = None, + reservation_id: str = None, + reservation_crn: str = None, + reservation_name: str = None, vpc_id: str = None, vpc_crn: str = None, vpc_name: str = None, @@ -167719,6 +167908,12 @@ def __init__( identifier. :param str name: (optional) Filters the collection to resources with a `name` property matching the exact specified name. + :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 identifier. + :param str reservation_name: (optional) Filters the collection to resources + 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 @@ -167732,6 +167927,9 @@ def __init__( self._limit = limit self._resource_group_id = resource_group_id self._name = name + self._reservation_id = reservation_id + self._reservation_crn = reservation_crn + self._reservation_name = reservation_name self._vpc_id = vpc_id self._vpc_crn = vpc_crn self._vpc_name = vpc_name @@ -167755,6 +167953,9 @@ def get_next(self) -> List[dict]: limit=self._limit, resource_group_id=self._resource_group_id, name=self._name, + reservation_id=self._reservation_id, + reservation_crn=self._reservation_crn, + reservation_name=self._reservation_name, vpc_id=self._vpc_id, vpc_crn=self._vpc_crn, vpc_name=self._vpc_name, @@ -168668,6 +168869,94 @@ def get_all(self) -> List[dict]: return results +class ShareSnapshotsPager: + """ + ShareSnapshotsPager can be used to simplify the use of the "list_share_snapshots" method. + """ + + def __init__( + self, + *, + client: VpcV1, + share_id: str, + backup_policy_plan_id: str = None, + name: str = None, + limit: int = None, + sort: str = None, + ) -> None: + """ + Initialize a ShareSnapshotsPager object. + :param str share_id: The file share identifier, or `-` to wildcard all + accessible file shares. + :param str backup_policy_plan_id: (optional) Filters the collection to + backup policy jobs with a `backup_policy_plan.id` property matching the + specified identifier. + :param str name: (optional) Filters the collection to resources with a + `name` property matching the exact specified name. + :param int limit: (optional) The number of resources to return on a page. + :param str sort: (optional) Sorts the returned collection by the specified + property name in ascending order. A `-` may be prepended to the name to + sort in descending order. For example, the value `-created_at` sorts the + collection by the `created_at` property in descending order, and the value + `name` sorts it by the `name` property in ascending order. + """ + self._has_next = True + self._client = client + self._page_context = {'next': None} + self._share_id = share_id + self._backup_policy_plan_id = backup_policy_plan_id + self._name = name + self._limit = limit + self._sort = sort + + 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 ShareSnapshot. + :rtype: List[dict] + """ + if not self.has_next(): + raise StopIteration(message='No more results available') + + result = self._client.list_share_snapshots( + share_id=self._share_id, + backup_policy_plan_id=self._backup_policy_plan_id, + name=self._name, + limit=self._limit, + sort=self._sort, + 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('snapshots') + + 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 ShareSnapshot. + :rtype: List[dict] + """ + results = [] + while self.has_next(): + next_page = self.get_next() + results.extend(next_page) + return results + + class BackupPoliciesPager: """ BackupPoliciesPager can be used to simplify the use of the "list_backup_policies" method. diff --git a/test/unit/test_vpc_v1.py b/test/unit/test_vpc_v1.py index 1c97af7..440b62a 100644 --- a/test/unit/test_vpc_v1.py +++ b/test/unit/test_vpc_v1.py @@ -218,7 +218,8 @@ 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()} with pytest.raises(ValueError): @@ -437,7 +438,8 @@ 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()} with pytest.raises(ValueError): @@ -878,7 +880,7 @@ def test_get_vpc_default_network_acl_all_params(self): """ # Set up mock url = preprocess_url('/vpcs/testString/default_network_acl') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "mnemonic-ersatz-eatery-mythology", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "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"}], "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"}}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "mnemonic-ersatz-eatery-mythology", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-network-acl-rule"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-network-acl-rule", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "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"}], "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"}}' responses.add( responses.GET, url, @@ -916,7 +918,7 @@ def test_get_vpc_default_network_acl_value_error(self): """ # Set up mock url = preprocess_url('/vpcs/testString/default_network_acl') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "mnemonic-ersatz-eatery-mythology", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "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"}], "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"}}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "mnemonic-ersatz-eatery-mythology", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-network-acl-rule"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-network-acl-rule", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "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"}], "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"}}' responses.add( responses.GET, url, @@ -1695,7 +1697,7 @@ def test_list_vpc_dns_resolution_bindings_all_params(self): """ # Set up mock url = preprocess_url('/vpcs/testString/dns_resolution_bindings') - mock_response = '{"dns_resolution_bindings": [{"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-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"}}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"dns_resolution_bindings": [{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "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-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"}}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -1757,7 +1759,7 @@ def test_list_vpc_dns_resolution_bindings_required_params(self): """ # Set up mock url = preprocess_url('/vpcs/testString/dns_resolution_bindings') - mock_response = '{"dns_resolution_bindings": [{"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-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"}}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"dns_resolution_bindings": [{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "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-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"}}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -1795,7 +1797,7 @@ def test_list_vpc_dns_resolution_bindings_value_error(self): """ # Set up mock url = preprocess_url('/vpcs/testString/dns_resolution_bindings') - mock_response = '{"dns_resolution_bindings": [{"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-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"}}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"dns_resolution_bindings": [{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "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-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"}}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -1832,8 +1834,8 @@ def test_list_vpc_dns_resolution_bindings_with_pager_get_next(self): """ # Set up a two-page mock response url = preprocess_url('/vpcs/testString/dns_resolution_bindings') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"dns_resolution_bindings":[{"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-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"}}]}' - mock_response2 = '{"total_count":2,"limit":1,"dns_resolution_bindings":[{"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-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"}}]}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"dns_resolution_bindings":[{"created_at":"2019-01-01T12:00:00.000Z","endpoint_gateways":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","id":"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","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-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"}}]}' + mock_response2 = '{"total_count":2,"limit":1,"dns_resolution_bindings":[{"created_at":"2019-01-01T12:00:00.000Z","endpoint_gateways":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","id":"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","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-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, url, @@ -1874,8 +1876,8 @@ def test_list_vpc_dns_resolution_bindings_with_pager_get_all(self): """ # Set up a two-page mock response url = preprocess_url('/vpcs/testString/dns_resolution_bindings') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"dns_resolution_bindings":[{"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-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"}}]}' - mock_response2 = '{"total_count":2,"limit":1,"dns_resolution_bindings":[{"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-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"}}]}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"dns_resolution_bindings":[{"created_at":"2019-01-01T12:00:00.000Z","endpoint_gateways":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","id":"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","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-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"}}]}' + mock_response2 = '{"total_count":2,"limit":1,"dns_resolution_bindings":[{"created_at":"2019-01-01T12:00:00.000Z","endpoint_gateways":[{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","id":"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","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-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, url, @@ -1919,7 +1921,7 @@ def test_create_vpc_dns_resolution_binding_all_params(self): """ # Set up mock url = preprocess_url('/vpcs/testString/dns_resolution_bindings') - 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-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"}}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "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-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.POST, url, @@ -1969,7 +1971,7 @@ def test_create_vpc_dns_resolution_binding_value_error(self): """ # Set up mock url = preprocess_url('/vpcs/testString/dns_resolution_bindings') - 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-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"}}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "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-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.POST, url, @@ -2019,7 +2021,7 @@ def test_delete_vpc_dns_resolution_binding_all_params(self): """ # Set up mock 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-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"}}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "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-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, url, @@ -2059,7 +2061,7 @@ def test_delete_vpc_dns_resolution_binding_value_error(self): """ # Set up mock 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-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"}}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "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-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, url, @@ -2104,7 +2106,7 @@ def test_get_vpc_dns_resolution_binding_all_params(self): """ # Set up mock 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-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"}}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "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-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, url, @@ -2144,7 +2146,7 @@ def test_get_vpc_dns_resolution_binding_value_error(self): """ # Set up mock 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-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"}}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "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-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, url, @@ -2189,7 +2191,7 @@ def test_update_vpc_dns_resolution_binding_all_params(self): """ # Set up mock 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-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"}}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "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-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, url, @@ -2238,7 +2240,7 @@ def test_update_vpc_dns_resolution_binding_value_error(self): """ # Set up mock 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-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"}}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "endpoint_gateways": [{"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "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-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, url, @@ -4334,7 +4336,7 @@ def test_list_subnets_all_params(self): """ # Set up mock url = preprocess_url('/subnets') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "subnets": [{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "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/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "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": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "subnets": [{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "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/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "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": 132}' responses.add( responses.GET, url, @@ -4400,7 +4402,7 @@ def test_list_subnets_required_params(self): """ # Set up mock url = preprocess_url('/subnets') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "subnets": [{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "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/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "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": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "subnets": [{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "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/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "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": 132}' responses.add( responses.GET, url, @@ -4432,7 +4434,7 @@ def test_list_subnets_value_error(self): """ # Set up mock url = preprocess_url('/subnets') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "subnets": [{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "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/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "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": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "subnets": [{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "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/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "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": 132}' responses.add( responses.GET, url, @@ -4442,7 +4444,8 @@ 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()} with pytest.raises(ValueError): @@ -4464,8 +4467,8 @@ def test_list_subnets_with_pager_get_next(self): """ # Set up a two-page mock response url = preprocess_url('/subnets') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"subnets":[{"available_ipv4_address_count":15,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","ip_version":"ipv4","ipv4_cidr_block":"10.0.0.0/24","name":"my-subnet","network_acl":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl"},"public_gateway":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241","id":"dc5431ef-1fc6-4861-adc9-a59d077d1241","name":"my-public-gateway","resource_type":"public_gateway"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"subnet","routing_table":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840","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/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840","id":"r006-6885e83f-03b2-4603-8a86-db2a0f55c840","name":"my-routing-table-1","resource_type":"routing_table"},"status":"available","total_ipv4_address_count":256,"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_response2 = '{"total_count":2,"limit":1,"subnets":[{"available_ipv4_address_count":15,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","ip_version":"ipv4","ipv4_cidr_block":"10.0.0.0/24","name":"my-subnet","network_acl":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl"},"public_gateway":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241","id":"dc5431ef-1fc6-4861-adc9-a59d077d1241","name":"my-public-gateway","resource_type":"public_gateway"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"subnet","routing_table":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840","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/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840","id":"r006-6885e83f-03b2-4603-8a86-db2a0f55c840","name":"my-routing-table-1","resource_type":"routing_table"},"status":"available","total_ipv4_address_count":256,"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_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"subnets":[{"available_ipv4_address_count":15,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","ip_version":"ipv4","ipv4_cidr_block":"10.0.0.0/24","name":"my-subnet","network_acl":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl"},"public_gateway":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241","id":"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241","name":"my-public-gateway","resource_type":"public_gateway"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"subnet","routing_table":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840","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/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840","id":"r006-6885e83f-03b2-4603-8a86-db2a0f55c840","name":"my-routing-table-1","resource_type":"routing_table"},"status":"available","total_ipv4_address_count":256,"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_response2 = '{"total_count":2,"limit":1,"subnets":[{"available_ipv4_address_count":15,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","ip_version":"ipv4","ipv4_cidr_block":"10.0.0.0/24","name":"my-subnet","network_acl":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl"},"public_gateway":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241","id":"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241","name":"my-public-gateway","resource_type":"public_gateway"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"subnet","routing_table":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840","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/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840","id":"r006-6885e83f-03b2-4603-8a86-db2a0f55c840","name":"my-routing-table-1","resource_type":"routing_table"},"status":"available","total_ipv4_address_count":256,"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, @@ -4507,8 +4510,8 @@ def test_list_subnets_with_pager_get_all(self): """ # Set up a two-page mock response url = preprocess_url('/subnets') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"subnets":[{"available_ipv4_address_count":15,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","ip_version":"ipv4","ipv4_cidr_block":"10.0.0.0/24","name":"my-subnet","network_acl":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl"},"public_gateway":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241","id":"dc5431ef-1fc6-4861-adc9-a59d077d1241","name":"my-public-gateway","resource_type":"public_gateway"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"subnet","routing_table":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840","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/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840","id":"r006-6885e83f-03b2-4603-8a86-db2a0f55c840","name":"my-routing-table-1","resource_type":"routing_table"},"status":"available","total_ipv4_address_count":256,"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_response2 = '{"total_count":2,"limit":1,"subnets":[{"available_ipv4_address_count":15,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","ip_version":"ipv4","ipv4_cidr_block":"10.0.0.0/24","name":"my-subnet","network_acl":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl"},"public_gateway":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241","id":"dc5431ef-1fc6-4861-adc9-a59d077d1241","name":"my-public-gateway","resource_type":"public_gateway"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"subnet","routing_table":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840","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/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840","id":"r006-6885e83f-03b2-4603-8a86-db2a0f55c840","name":"my-routing-table-1","resource_type":"routing_table"},"status":"available","total_ipv4_address_count":256,"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_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"subnets":[{"available_ipv4_address_count":15,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","ip_version":"ipv4","ipv4_cidr_block":"10.0.0.0/24","name":"my-subnet","network_acl":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl"},"public_gateway":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241","id":"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241","name":"my-public-gateway","resource_type":"public_gateway"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"subnet","routing_table":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840","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/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840","id":"r006-6885e83f-03b2-4603-8a86-db2a0f55c840","name":"my-routing-table-1","resource_type":"routing_table"},"status":"available","total_ipv4_address_count":256,"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_response2 = '{"total_count":2,"limit":1,"subnets":[{"available_ipv4_address_count":15,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e","ip_version":"ipv4","ipv4_cidr_block":"10.0.0.0/24","name":"my-subnet","network_acl":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl"},"public_gateway":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241","id":"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241","name":"my-public-gateway","resource_type":"public_gateway"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"subnet","routing_table":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840","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/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840","id":"r006-6885e83f-03b2-4603-8a86-db2a0f55c840","name":"my-routing-table-1","resource_type":"routing_table"},"status":"available","total_ipv4_address_count":256,"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, @@ -4553,7 +4556,7 @@ def test_create_subnet_all_params(self): """ # Set up mock url = preprocess_url('/subnets') - mock_response = '{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "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/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "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 = '{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "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/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "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, @@ -4568,7 +4571,7 @@ def test_create_subnet_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'] = 'r006-dc5431ef-1fc6-4861-adc9-a59d077d1241' # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -4630,7 +4633,7 @@ def test_create_subnet_value_error(self): """ # Set up mock url = preprocess_url('/subnets') - mock_response = '{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "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/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "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 = '{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "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/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "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, @@ -4645,7 +4648,7 @@ def test_create_subnet_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'] = 'r006-dc5431ef-1fc6-4861-adc9-a59d077d1241' # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -4784,7 +4787,7 @@ def test_get_subnet_all_params(self): """ # Set up mock url = preprocess_url('/subnets/testString') - mock_response = '{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "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/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "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 = '{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "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/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "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, @@ -4822,7 +4825,7 @@ def test_get_subnet_value_error(self): """ # Set up mock url = preprocess_url('/subnets/testString') - mock_response = '{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "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/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "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 = '{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "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/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "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, @@ -4865,7 +4868,7 @@ def test_update_subnet_all_params(self): """ # Set up mock url = preprocess_url('/subnets/testString') - mock_response = '{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "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/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "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 = '{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "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/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "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, @@ -4880,7 +4883,7 @@ def test_update_subnet_all_params(self): # 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'] = 'r006-dc5431ef-1fc6-4861-adc9-a59d077d1241' # Construct a dict representation of a RoutingTableIdentityById model routing_table_identity_model = {} @@ -4927,7 +4930,7 @@ def test_update_subnet_value_error(self): """ # Set up mock url = preprocess_url('/subnets/testString') - mock_response = '{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "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/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "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 = '{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::subnet:0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "ip_version": "ipv4", "ipv4_cidr_block": "10.0.0.0/24", "name": "my-subnet", "network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_type": "public_gateway"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "subnet", "routing_table": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "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/routing_tables/r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "r006-6885e83f-03b2-4603-8a86-db2a0f55c840", "name": "my-routing-table-1", "resource_type": "routing_table"}, "status": "available", "total_ipv4_address_count": 256, "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, @@ -4942,7 +4945,7 @@ def test_update_subnet_value_error(self): # 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'] = 'r006-dc5431ef-1fc6-4861-adc9-a59d077d1241' # Construct a dict representation of a RoutingTableIdentityById model routing_table_identity_model = {} @@ -4991,7 +4994,7 @@ def test_get_subnet_network_acl_all_params(self): """ # Set up mock url = preprocess_url('/subnets/testString/network_acl') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "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"}], "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"}}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-network-acl-rule"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-network-acl-rule", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "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"}], "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"}}' responses.add( responses.GET, url, @@ -5029,7 +5032,7 @@ def test_get_subnet_network_acl_value_error(self): """ # Set up mock url = preprocess_url('/subnets/testString/network_acl') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "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"}], "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"}}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-network-acl-rule"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-network-acl-rule", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "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"}], "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"}}' responses.add( responses.GET, url, @@ -5072,7 +5075,7 @@ def test_replace_subnet_network_acl_all_params(self): """ # Set up mock url = preprocess_url('/subnets/testString/network_acl') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "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"}], "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"}}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-network-acl-rule"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-network-acl-rule", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "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"}], "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"}}' responses.add( responses.PUT, url, @@ -5119,7 +5122,7 @@ def test_replace_subnet_network_acl_value_error(self): """ # Set up mock url = preprocess_url('/subnets/testString/network_acl') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "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"}], "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"}}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-network-acl-rule"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-network-acl-rule", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "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"}], "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"}}' responses.add( responses.PUT, url, @@ -5243,7 +5246,7 @@ def test_get_subnet_public_gateway_all_params(self): """ # Set up mock url = preprocess_url('/subnets/testString/public_gateway') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "id": "r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "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 = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "id": "r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "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, @@ -5281,7 +5284,7 @@ def test_get_subnet_public_gateway_value_error(self): """ # Set up mock url = preprocess_url('/subnets/testString/public_gateway') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "id": "r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "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 = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "id": "r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "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, @@ -5324,7 +5327,7 @@ def test_set_subnet_public_gateway_all_params(self): """ # Set up mock url = preprocess_url('/subnets/testString/public_gateway') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "id": "r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "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 = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "id": "r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "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.PUT, url, @@ -5335,7 +5338,7 @@ 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'] = 'r006-dc5431ef-1fc6-4861-adc9-a59d077d1241' # Set up parameter values id = 'testString' @@ -5371,7 +5374,7 @@ def test_set_subnet_public_gateway_value_error(self): """ # Set up mock url = preprocess_url('/subnets/testString/public_gateway') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "id": "r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "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 = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "id": "r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "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.PUT, url, @@ -5382,7 +5385,7 @@ 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'] = 'r006-dc5431ef-1fc6-4861-adc9-a59d077d1241' # Set up parameter values id = 'testString' @@ -5512,9 +5515,7 @@ def test_replace_subnet_routing_table_all_params(self): # Construct a dict representation of a RoutingTableIdentityByCRN model routing_table_identity_model = {} - routing_table_identity_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' - ) + routing_table_identity_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' # Set up parameter values id = 'testString' @@ -5561,9 +5562,7 @@ def test_replace_subnet_routing_table_value_error(self): # Construct a dict representation of a RoutingTableIdentityByCRN model routing_table_identity_model = {} - routing_table_identity_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' - ) + routing_table_identity_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' # Set up parameter values id = 'testString' @@ -5601,7 +5600,7 @@ def test_list_subnet_reserved_ips_all_params(self): """ # Set up mock url = preprocess_url('/subnets/testString/reserved_ips') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "reserved_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": "provider", "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"}}], "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "reserved_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": "provider", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "total_count": 132}' responses.add( responses.GET, url, @@ -5616,7 +5615,7 @@ def test_list_subnet_reserved_ips_all_params(self): limit = 50 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:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727' target_name = 'my-resource' target_resource_type = 'testString' @@ -5663,7 +5662,7 @@ def test_list_subnet_reserved_ips_required_params(self): """ # Set up mock url = preprocess_url('/subnets/testString/reserved_ips') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "reserved_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": "provider", "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"}}], "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "reserved_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": "provider", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "total_count": 132}' responses.add( responses.GET, url, @@ -5701,7 +5700,7 @@ def test_list_subnet_reserved_ips_value_error(self): """ # Set up mock url = preprocess_url('/subnets/testString/reserved_ips') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "reserved_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": "provider", "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"}}], "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "reserved_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": "provider", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "total_count": 132}' responses.add( responses.GET, url, @@ -5738,8 +5737,8 @@ def test_list_subnet_reserved_ips_with_pager_get_next(self): """ # Set up a two-page mock response url = preprocess_url('/subnets/testString/reserved_ips') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"reserved_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":"provider","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"}}],"total_count":2,"limit":1}' - mock_response2 = '{"reserved_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":"provider","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"}}],"total_count":2,"limit":1}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"reserved_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":"provider","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","id":"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","name":"my-endpoint-gateway","resource_type":"endpoint_gateway"}}],"total_count":2,"limit":1}' + mock_response2 = '{"reserved_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":"provider","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","id":"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","name":"my-endpoint-gateway","resource_type":"endpoint_gateway"}}],"total_count":2,"limit":1}' responses.add( responses.GET, url, @@ -5763,7 +5762,7 @@ 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:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727', target_name='my-resource', target_resource_type='testString', ) @@ -5780,8 +5779,8 @@ def test_list_subnet_reserved_ips_with_pager_get_all(self): """ # Set up a two-page mock response url = preprocess_url('/subnets/testString/reserved_ips') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"reserved_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":"provider","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"}}],"total_count":2,"limit":1}' - mock_response2 = '{"reserved_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":"provider","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"}}],"total_count":2,"limit":1}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"reserved_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":"provider","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","id":"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","name":"my-endpoint-gateway","resource_type":"endpoint_gateway"}}],"total_count":2,"limit":1}' + mock_response2 = '{"reserved_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":"provider","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","id":"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","name":"my-endpoint-gateway","resource_type":"endpoint_gateway"}}],"total_count":2,"limit":1}' responses.add( responses.GET, url, @@ -5804,7 +5803,7 @@ 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:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727', target_name='my-resource', target_resource_type='testString', ) @@ -5825,7 +5824,7 @@ def test_create_subnet_reserved_ip_all_params(self): """ # Set up mock url = preprocess_url('/subnets/testString/reserved_ips') - 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": "provider", "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_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": "provider", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}' responses.add( responses.POST, url, @@ -5836,7 +5835,7 @@ 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'] = 'r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' # Set up parameter values subnet_id = 'testString' @@ -5881,7 +5880,7 @@ def test_create_subnet_reserved_ip_value_error(self): """ # Set up mock url = preprocess_url('/subnets/testString/reserved_ips') - 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": "provider", "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_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": "provider", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}' responses.add( responses.POST, url, @@ -5892,7 +5891,7 @@ 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'] = 'r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' # Set up parameter values subnet_id = 'testString' @@ -6011,7 +6010,7 @@ def test_get_subnet_reserved_ip_all_params(self): """ # Set up mock url = preprocess_url('/subnets/testString/reserved_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": "provider", "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_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": "provider", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}' responses.add( responses.GET, url, @@ -6051,7 +6050,7 @@ def test_get_subnet_reserved_ip_value_error(self): """ # Set up mock url = preprocess_url('/subnets/testString/reserved_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": "provider", "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_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": "provider", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}' responses.add( responses.GET, url, @@ -6096,7 +6095,7 @@ def test_update_subnet_reserved_ip_all_params(self): """ # Set up mock url = preprocess_url('/subnets/testString/reserved_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": "provider", "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_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": "provider", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}' responses.add( responses.PATCH, url, @@ -6146,7 +6145,7 @@ def test_update_subnet_reserved_ip_value_error(self): """ # Set up mock url = preprocess_url('/subnets/testString/reserved_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": "provider", "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_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": "provider", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}' responses.add( responses.PATCH, url, @@ -6357,7 +6356,8 @@ 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()} with pytest.raises(ValueError): @@ -6479,9 +6479,7 @@ 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 = {} @@ -6549,9 +6547,7 @@ 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 = {} @@ -7012,7 +7008,7 @@ def test_list_image_export_jobs_all_params(self): """ # Set up mock url = preprocess_url('/images/testString/export_jobs') - mock_response = '{"export_jobs": [{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r134-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r134-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}]}' + mock_response = '{"export_jobs": [{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r006-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r006-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export-job", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:bucket-27200-lwx4cfvcue", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}]}' responses.add( responses.GET, url, @@ -7056,7 +7052,7 @@ def test_list_image_export_jobs_required_params(self): """ # Set up mock url = preprocess_url('/images/testString/export_jobs') - mock_response = '{"export_jobs": [{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r134-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r134-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}]}' + mock_response = '{"export_jobs": [{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r006-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r006-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export-job", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:bucket-27200-lwx4cfvcue", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}]}' responses.add( responses.GET, url, @@ -7094,7 +7090,7 @@ def test_list_image_export_jobs_value_error(self): """ # Set up mock url = preprocess_url('/images/testString/export_jobs') - mock_response = '{"export_jobs": [{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r134-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r134-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}]}' + mock_response = '{"export_jobs": [{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r006-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r006-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export-job", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:bucket-27200-lwx4cfvcue", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}]}' responses.add( responses.GET, url, @@ -7137,7 +7133,7 @@ def test_create_image_export_job_all_params(self): """ # Set up mock url = preprocess_url('/images/testString/export_jobs') - mock_response = '{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r134-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r134-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}' + mock_response = '{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r006-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r006-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export-job", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:bucket-27200-lwx4cfvcue", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}' responses.add( responses.POST, url, @@ -7190,7 +7186,7 @@ def test_create_image_export_job_value_error(self): """ # Set up mock url = preprocess_url('/images/testString/export_jobs') - mock_response = '{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r134-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r134-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}' + mock_response = '{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r006-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r006-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export-job", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:bucket-27200-lwx4cfvcue", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}' responses.add( responses.POST, url, @@ -7320,7 +7316,7 @@ def test_get_image_export_job_all_params(self): """ # Set up mock url = preprocess_url('/images/testString/export_jobs/testString') - mock_response = '{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r134-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r134-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}' + mock_response = '{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r006-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r006-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export-job", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:bucket-27200-lwx4cfvcue", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}' responses.add( responses.GET, url, @@ -7360,7 +7356,7 @@ def test_get_image_export_job_value_error(self): """ # Set up mock url = preprocess_url('/images/testString/export_jobs/testString') - mock_response = '{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r134-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r134-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}' + mock_response = '{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r006-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r006-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export-job", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:bucket-27200-lwx4cfvcue", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}' responses.add( responses.GET, url, @@ -7405,7 +7401,7 @@ def test_update_image_export_job_all_params(self): """ # Set up mock url = preprocess_url('/images/testString/export_jobs/testString') - mock_response = '{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r134-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r134-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}' + mock_response = '{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r006-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r006-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export-job", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:bucket-27200-lwx4cfvcue", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}' responses.add( responses.PATCH, url, @@ -7416,7 +7412,7 @@ def test_update_image_export_job_all_params(self): # Construct a dict representation of a ImageExportJobPatch model image_export_job_patch_model = {} - image_export_job_patch_model['name'] = 'my-image-export' + image_export_job_patch_model['name'] = 'my-image-export-job-updated' # Set up parameter values image_id = 'testString' @@ -7454,7 +7450,7 @@ def test_update_image_export_job_value_error(self): """ # Set up mock url = preprocess_url('/images/testString/export_jobs/testString') - mock_response = '{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r134-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r134-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}' + mock_response = '{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "encrypted_data_key": "VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=", "format": "qcow2", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r006-095e9baf-01d4-4e29-986e-20d26606b82a", "id": "r006-095e9baf-01d4-4e29-986e-20d26606b82a", "name": "my-image-export-job", "resource_type": "image_export_job", "started_at": "2019-01-01T12:00:00.000Z", "status": "deleting", "status_reasons": [{"code": "cannot_access_storage_bucket", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq"}], "storage_bucket": {"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:bucket-27200-lwx4cfvcue", "name": "bucket-27200-lwx4cfvcue"}, "storage_href": "cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2", "storage_object": {"name": "my-object"}}' responses.add( responses.PATCH, url, @@ -7465,7 +7461,7 @@ def test_update_image_export_job_value_error(self): # Construct a dict representation of a ImageExportJobPatch model image_export_job_patch_model = {} - image_export_job_patch_model['name'] = 'my-image-export' + image_export_job_patch_model['name'] = 'my-image-export-job-updated' # Set up parameter values image_id = 'testString' @@ -7592,7 +7588,8 @@ 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()} with pytest.raises(ValueError): @@ -7917,7 +7914,8 @@ 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()} with pytest.raises(ValueError): @@ -8049,10 +8047,7 @@ 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-1' assert req_body['resource_group'] == resource_group_identity_model assert req_body['type'] == 'rsa' @@ -8474,7 +8469,8 @@ 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()} with pytest.raises(ValueError): @@ -8583,7 +8579,7 @@ def test_list_instance_templates_all_params(self): """ # Set up mock url = preprocess_url('/instance/templates') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "templates": [{"availability_policy": {"host_failure": "restart"}, "cluster_network_attachments": [{"cluster_network_interface": {"auto_delete": false, "name": "my-cluster-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "subnet": {"id": "0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930"}}, "name": "my-instance-network-attachment"}], "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": "r006-82679077-ac3b-4c10-be16-63e9c21f0f45"}], "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": "0717-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}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "templates": [{"availability_policy": {"host_failure": "restart"}, "cluster_network_attachments": [{"cluster_network_interface": {"auto_delete": false, "name": "my-cluster-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "subnet": {"id": "0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930"}}, "name": "my-instance-network-attachment"}], "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:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "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/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "id": "0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "keys": [{"id": "r006-82679077-ac3b-4c10-be16-63e9c21f0f45"}], "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": "automatic", "pool": [{"id": "0717-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, @@ -8615,7 +8611,7 @@ def test_list_instance_templates_value_error(self): """ # Set up mock url = preprocess_url('/instance/templates') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "templates": [{"availability_policy": {"host_failure": "restart"}, "cluster_network_attachments": [{"cluster_network_interface": {"auto_delete": false, "name": "my-cluster-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "subnet": {"id": "0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930"}}, "name": "my-instance-network-attachment"}], "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": "r006-82679077-ac3b-4c10-be16-63e9c21f0f45"}], "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": "0717-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}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "templates": [{"availability_policy": {"host_failure": "restart"}, "cluster_network_attachments": [{"cluster_network_interface": {"auto_delete": false, "name": "my-cluster-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "subnet": {"id": "0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930"}}, "name": "my-instance-network-attachment"}], "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:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "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/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "id": "0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "keys": [{"id": "r006-82679077-ac3b-4c10-be16-63e9c21f0f45"}], "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": "automatic", "pool": [{"id": "0717-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, @@ -8625,7 +8621,8 @@ 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()} with pytest.raises(ValueError): @@ -8653,7 +8650,7 @@ def test_create_instance_template_all_params(self): """ # Set up mock url = preprocess_url('/instance/templates') - mock_response = '{"availability_policy": {"host_failure": "restart"}, "cluster_network_attachments": [{"cluster_network_interface": {"auto_delete": false, "name": "my-cluster-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "subnet": {"id": "0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930"}}, "name": "my-instance-network-attachment"}], "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": "r006-82679077-ac3b-4c10-be16-63e9c21f0f45"}], "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": "0717-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"}}}}' + mock_response = '{"availability_policy": {"host_failure": "restart"}, "cluster_network_attachments": [{"cluster_network_interface": {"auto_delete": false, "name": "my-cluster-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "subnet": {"id": "0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930"}}, "name": "my-instance-network-attachment"}], "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:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "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/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "id": "0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "keys": [{"id": "r006-82679077-ac3b-4c10-be16-63e9c21f0f45"}], "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": "automatic", "pool": [{"id": "0717-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, @@ -8679,21 +8676,263 @@ def test_create_instance_template_all_params(self): # Construct a dict representation of a InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment model instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = ( - 'my-cluster-network-interface' - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = ( - cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = cluster_network_subnet_identity_model + + # Construct a dict representation of a InstanceClusterNetworkAttachmentPrototypeInstanceContext model + instance_cluster_network_attachment_prototype_instance_context_model = {} + instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = instance_cluster_network_attachment_prototype_cluster_network_interface_model + instance_cluster_network_attachment_prototype_instance_context_model['name'] = 'my-instance-network-attachment' + + # Construct a dict representation of a TrustedProfileIdentityById model + trusted_profile_identity_model = {} + 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 + + # Construct a dict representation of a KeyIdentityById model + key_identity_model = {} + key_identity_model['id'] = '363f6d70-0000-0001-0000-00000013b96c' + + # Construct a dict representation of a InstanceMetadataServicePrototype model + instance_metadata_service_prototype_model = {} + instance_metadata_service_prototype_model['enabled'] = False + instance_metadata_service_prototype_model['protocol'] = 'https' + instance_metadata_service_prototype_model['response_hop_limit'] = 2 + + # 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' + + # Construct a dict representation of a InstanceProfileIdentityByName model + instance_profile_identity_model = {} + instance_profile_identity_model['name'] = 'bx2-2x8' + + # Construct a dict representation of a ReservationIdentityById model + reservation_identity_model = {} + reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' + + # Construct a dict representation of a InstanceReservationAffinityPrototype model + instance_reservation_affinity_prototype_model = {} + instance_reservation_affinity_prototype_model['policy'] = 'automatic' + instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + + # Construct a dict representation of a ResourceGroupIdentityById model + resource_group_identity_model = {} + resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' + + # 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' + + # 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['name'] = 'my-volume-attachment' + volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model + + # Construct a dict representation of a VPCIdentityById model + vpc_identity_model = {} + vpc_identity_model['id'] = 'dc201ab2-8536-4904-86a8-084d84582133' + + # 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' + + # Construct a dict representation of a VolumeProfileIdentityByName model + volume_profile_identity_model = {} + volume_profile_identity_model['name'] = 'general-purpose' + + # 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['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'] = [] + + # 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 + + # 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' + + # Construct a dict representation of a InstanceCatalogOfferingPrototypeCatalogOfferingByOffering model + instance_catalog_offering_prototype_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 = {} + image_identity_model['id'] = '3f9a2d96-830e-4100-9b4c-663225a3f872' + + # Construct a dict representation of a VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext model + virtual_network_interface_ip_prototype_model = {} + 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' + + # 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' + + # Construct a dict representation of a SecurityGroupIdentityById model + security_group_identity_model = {} + security_group_identity_model['id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' + + # Construct a dict representation of a SubnetIdentityById model + subnet_identity_model = {} + subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' + + # 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['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 + + # Construct a dict representation of a NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext model + network_interface_ip_prototype_model = {} + 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' + + # 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['subnet'] = subnet_identity_model + + # Construct a dict representation of a InstanceTemplateIdentityById model + instance_template_identity_model = {} + instance_template_identity_model['id'] = '0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' + + # Construct a dict representation of a ZoneIdentityByName model + zone_identity_model = {} + zone_identity_model['name'] = 'us-south-1' + + # 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['cluster_network_attachments'] = [instance_cluster_network_attachment_prototype_instance_context_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['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['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['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['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['zone'] = zone_identity_model + + # Set up parameter values + instance_template_prototype = instance_template_prototype_model + + # Invoke method + response = _service.create_instance_template( + instance_template_prototype, + headers={}, ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = ( - cluster_network_subnet_identity_model + + # Check for correct operation + assert len(responses.calls) == 1 + assert response.status_code == 201 + # Validate body params + req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) + assert req_body == instance_template_prototype + + def test_create_instance_template_all_params_with_retries(self): + # Enable retries and run test_create_instance_template_all_params. + _service.enable_retries() + self.test_create_instance_template_all_params() + + # Disable retries and run test_create_instance_template_all_params. + _service.disable_retries() + self.test_create_instance_template_all_params() + + @responses.activate + def test_create_instance_template_value_error(self): + """ + test_create_instance_template_value_error() + """ + # Set up mock + url = preprocess_url('/instance/templates') + mock_response = '{"availability_policy": {"host_failure": "restart"}, "cluster_network_attachments": [{"cluster_network_interface": {"auto_delete": false, "name": "my-cluster-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "subnet": {"id": "0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930"}}, "name": "my-instance-network-attachment"}], "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:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "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/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "id": "0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "keys": [{"id": "r006-82679077-ac3b-4c10-be16-63e9c21f0f45"}], "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": "automatic", "pool": [{"id": "0717-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, + body=mock_response, + content_type='application/json', + status=201, ) + # Construct a dict representation of a InstanceAvailabilityPolicyPrototype model + instance_availability_policy_prototype_model = {} + instance_availability_policy_prototype_model['host_failure'] = 'restart' + + # Construct a dict representation of a ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext model + cluster_network_interface_primary_ip_prototype_model = {} + cluster_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' + cluster_network_interface_primary_ip_prototype_model['auto_delete'] = False + cluster_network_interface_primary_ip_prototype_model['name'] = 'my-cluster-network-subnet-reserved-ip' + + # Construct a dict representation of a ClusterNetworkSubnetIdentityById model + cluster_network_subnet_identity_model = {} + cluster_network_subnet_identity_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' + + # Construct a dict representation of a InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment model + instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} + instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False + instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = cluster_network_subnet_identity_model + # Construct a dict representation of a InstanceClusterNetworkAttachmentPrototypeInstanceContext model instance_cluster_network_attachment_prototype_instance_context_model = {} - instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_model - ) + instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = instance_cluster_network_attachment_prototype_cluster_network_interface_model instance_cluster_network_attachment_prototype_instance_context_model['name'] = 'my-instance-network-attachment' # Construct a dict representation of a TrustedProfileIdentityById model @@ -8729,7 +8968,7 @@ def test_create_instance_template_all_params(self): # 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['policy'] = 'automatic' instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] # Construct a dict representation of a ResourceGroupIdentityById model @@ -8752,9 +8991,7 @@ 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 = {} @@ -8774,21 +9011,15 @@ def test_create_instance_template_all_params(self): 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['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' - ) + 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 = {} @@ -8824,28 +9055,18 @@ def test_create_instance_template_all_params(self): 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['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['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['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['virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model # Construct a dict representation of a NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext model network_interface_ip_prototype_model = {} @@ -8863,7 +9084,7 @@ def test_create_instance_template_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'] = '0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' # Construct a dict representation of a ZoneIdentityByName model zone_identity_model = {} @@ -8872,9 +9093,7 @@ 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['cluster_network_attachments'] = [ - instance_cluster_network_attachment_prototype_instance_context_model - ] + instance_template_prototype_model['cluster_network_attachments'] = [instance_cluster_network_attachment_prototype_instance_context_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 @@ -8889,289 +9108,7 @@ def test_create_instance_template_all_params(self): instance_template_prototype_model['user_data'] = 'testString' 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['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['zone'] = zone_identity_model - - # Set up parameter values - instance_template_prototype = instance_template_prototype_model - - # Invoke method - response = _service.create_instance_template( - instance_template_prototype, - headers={}, - ) - - # Check for correct operation - assert len(responses.calls) == 1 - assert response.status_code == 201 - # Validate body params - req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) - assert req_body == instance_template_prototype - - def test_create_instance_template_all_params_with_retries(self): - # Enable retries and run test_create_instance_template_all_params. - _service.enable_retries() - self.test_create_instance_template_all_params() - - # Disable retries and run test_create_instance_template_all_params. - _service.disable_retries() - self.test_create_instance_template_all_params() - - @responses.activate - def test_create_instance_template_value_error(self): - """ - test_create_instance_template_value_error() - """ - # Set up mock - url = preprocess_url('/instance/templates') - mock_response = '{"availability_policy": {"host_failure": "restart"}, "cluster_network_attachments": [{"cluster_network_interface": {"auto_delete": false, "name": "my-cluster-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "subnet": {"id": "0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930"}}, "name": "my-instance-network-attachment"}], "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": "r006-82679077-ac3b-4c10-be16-63e9c21f0f45"}], "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": "0717-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, - body=mock_response, - content_type='application/json', - status=201, - ) - - # Construct a dict representation of a InstanceAvailabilityPolicyPrototype model - instance_availability_policy_prototype_model = {} - instance_availability_policy_prototype_model['host_failure'] = 'restart' - - # Construct a dict representation of a ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext model - cluster_network_interface_primary_ip_prototype_model = {} - cluster_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' - cluster_network_interface_primary_ip_prototype_model['auto_delete'] = False - cluster_network_interface_primary_ip_prototype_model['name'] = 'my-cluster-network-subnet-reserved-ip' - - # Construct a dict representation of a ClusterNetworkSubnetIdentityById model - cluster_network_subnet_identity_model = {} - cluster_network_subnet_identity_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - - # Construct a dict representation of a InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment model - instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} - instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = ( - 'my-cluster-network-interface' - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = ( - cluster_network_interface_primary_ip_prototype_model - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = ( - cluster_network_subnet_identity_model - ) - - # Construct a dict representation of a InstanceClusterNetworkAttachmentPrototypeInstanceContext model - instance_cluster_network_attachment_prototype_instance_context_model = {} - instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_model - ) - instance_cluster_network_attachment_prototype_instance_context_model['name'] = 'my-instance-network-attachment' - - # Construct a dict representation of a TrustedProfileIdentityById model - trusted_profile_identity_model = {} - 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 - - # Construct a dict representation of a KeyIdentityById model - key_identity_model = {} - key_identity_model['id'] = '363f6d70-0000-0001-0000-00000013b96c' - - # Construct a dict representation of a InstanceMetadataServicePrototype model - instance_metadata_service_prototype_model = {} - instance_metadata_service_prototype_model['enabled'] = False - instance_metadata_service_prototype_model['protocol'] = 'https' - instance_metadata_service_prototype_model['response_hop_limit'] = 2 - - # 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' - - # Construct a dict representation of a InstanceProfileIdentityByName model - instance_profile_identity_model = {} - instance_profile_identity_model['name'] = 'bx2-2x8' - - # Construct a dict representation of a ReservationIdentityById model - reservation_identity_model = {} - reservation_identity_model['id'] = '0717-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] - - # Construct a dict representation of a ResourceGroupIdentityById model - resource_group_identity_model = {} - resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' - - # 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' - - # 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['name'] = 'my-volume-attachment' - volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model - - # Construct a dict representation of a VPCIdentityById model - vpc_identity_model = {} - vpc_identity_model['id'] = 'dc201ab2-8536-4904-86a8-084d84582133' - - # 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' - ) - - # Construct a dict representation of a VolumeProfileIdentityByName model - volume_profile_identity_model = {} - volume_profile_identity_model['name'] = 'general-purpose' - - # 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['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'] = [] - - # 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 - ) - - # 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' - ) - - # Construct a dict representation of a InstanceCatalogOfferingPrototypeCatalogOfferingByOffering model - instance_catalog_offering_prototype_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 = {} - image_identity_model['id'] = '3f9a2d96-830e-4100-9b4c-663225a3f872' - - # Construct a dict representation of a VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext model - virtual_network_interface_ip_prototype_model = {} - 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' - - # 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' - - # Construct a dict representation of a SecurityGroupIdentityById model - security_group_identity_model = {} - security_group_identity_model['id'] = 'r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' - - # Construct a dict representation of a SubnetIdentityById model - subnet_identity_model = {} - subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e' - - # 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['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 - ) - - # Construct a dict representation of a NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext model - network_interface_ip_prototype_model = {} - 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' - - # 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['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' - - # Construct a dict representation of a ZoneIdentityByName model - zone_identity_model = {} - zone_identity_model['name'] = 'us-south-1' - - # 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['cluster_network_attachments'] = [ - instance_cluster_network_attachment_prototype_instance_context_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['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['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['vpc'] = vpc_identity_model - instance_template_prototype_model['boot_volume_attachment'] = ( - volume_attachment_prototype_instance_by_image_context_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] @@ -9290,7 +9227,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"}, "cluster_network_attachments": [{"cluster_network_interface": {"auto_delete": false, "name": "my-cluster-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "subnet": {"id": "0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930"}}, "name": "my-instance-network-attachment"}], "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": "r006-82679077-ac3b-4c10-be16-63e9c21f0f45"}], "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": "0717-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"}}}}' + mock_response = '{"availability_policy": {"host_failure": "restart"}, "cluster_network_attachments": [{"cluster_network_interface": {"auto_delete": false, "name": "my-cluster-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "subnet": {"id": "0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930"}}, "name": "my-instance-network-attachment"}], "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:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "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/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "id": "0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "keys": [{"id": "r006-82679077-ac3b-4c10-be16-63e9c21f0f45"}], "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": "automatic", "pool": [{"id": "0717-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, @@ -9328,7 +9265,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"}, "cluster_network_attachments": [{"cluster_network_interface": {"auto_delete": false, "name": "my-cluster-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "subnet": {"id": "0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930"}}, "name": "my-instance-network-attachment"}], "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": "r006-82679077-ac3b-4c10-be16-63e9c21f0f45"}], "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": "0717-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"}}}}' + mock_response = '{"availability_policy": {"host_failure": "restart"}, "cluster_network_attachments": [{"cluster_network_interface": {"auto_delete": false, "name": "my-cluster-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "subnet": {"id": "0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930"}}, "name": "my-instance-network-attachment"}], "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:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "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/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "id": "0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "keys": [{"id": "r006-82679077-ac3b-4c10-be16-63e9c21f0f45"}], "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": "automatic", "pool": [{"id": "0717-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, @@ -9371,7 +9308,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"}, "cluster_network_attachments": [{"cluster_network_interface": {"auto_delete": false, "name": "my-cluster-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "subnet": {"id": "0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930"}}, "name": "my-instance-network-attachment"}], "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": "r006-82679077-ac3b-4c10-be16-63e9c21f0f45"}], "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": "0717-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"}}}}' + mock_response = '{"availability_policy": {"host_failure": "restart"}, "cluster_network_attachments": [{"cluster_network_interface": {"auto_delete": false, "name": "my-cluster-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "subnet": {"id": "0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930"}}, "name": "my-instance-network-attachment"}], "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:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "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/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "id": "0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "keys": [{"id": "r006-82679077-ac3b-4c10-be16-63e9c21f0f45"}], "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": "automatic", "pool": [{"id": "0717-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, @@ -9418,7 +9355,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"}, "cluster_network_attachments": [{"cluster_network_interface": {"auto_delete": false, "name": "my-cluster-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "subnet": {"id": "0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930"}}, "name": "my-instance-network-attachment"}], "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": "r006-82679077-ac3b-4c10-be16-63e9c21f0f45"}], "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": "0717-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"}}}}' + mock_response = '{"availability_policy": {"host_failure": "restart"}, "cluster_network_attachments": [{"cluster_network_interface": {"auto_delete": false, "name": "my-cluster-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "subnet": {"id": "0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930"}}, "name": "my-instance-network-attachment"}], "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:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "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/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "id": "0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "keys": [{"id": "r006-82679077-ac3b-4c10-be16-63e9c21f0f45"}], "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": "automatic", "pool": [{"id": "0717-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, @@ -9467,7 +9404,7 @@ def test_list_instances_all_params(self): """ # Set up mock url = preprocess_url('/instances') - mock_response = '{"first": {"href": "href"}, "instances": [{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}}, "cluster_network": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573", "id": "0717-da0df18c-7598-4633-a648-fdaac28a5573", "name": "my-cluster-network", "resource_type": "cluster_network"}, "cluster_network_attachments": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213", "id": "0717-fb880975-db45-4459-8548-64e3995ac213", "name": "my-instance-network-attachment", "resource_type": "instance_cluster_network_attachment"}], "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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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": 64, "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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:0717-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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-dedicated-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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "instances": [{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}}, "cluster_network": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573", "id": "0717-da0df18c-7598-4633-a648-fdaac28a5573", "name": "my-cluster-network", "resource_type": "cluster_network"}, "cluster_network_attachments": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213", "id": "0717-fb880975-db45-4459-8548-64e3995ac213", "name": "my-instance-network-attachment", "resource_type": "instance_cluster_network_attachment"}], "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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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": 64, "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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:0717-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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-dedicated-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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "automatic", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -9488,8 +9425,9 @@ def test_list_instances_all_params(self): 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:r006-418fe842-a3e9-47b9-a938-1aa5bd632871' placement_group_name = 'my-placement-group' + reservation_affinity_policy = 'automatic' reservation_id = 'testString' reservation_crn = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63' reservation_name = 'my-reservation' @@ -9512,6 +9450,7 @@ def test_list_instances_all_params(self): placement_group_id=placement_group_id, placement_group_crn=placement_group_crn, placement_group_name=placement_group_name, + reservation_affinity_policy=reservation_affinity_policy, reservation_id=reservation_id, reservation_crn=reservation_crn, reservation_name=reservation_name, @@ -9540,6 +9479,7 @@ def test_list_instances_all_params(self): 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_affinity.policy={}'.format(reservation_affinity_policy) 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 @@ -9563,7 +9503,7 @@ def test_list_instances_required_params(self): """ # Set up mock url = preprocess_url('/instances') - mock_response = '{"first": {"href": "href"}, "instances": [{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}}, "cluster_network": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573", "id": "0717-da0df18c-7598-4633-a648-fdaac28a5573", "name": "my-cluster-network", "resource_type": "cluster_network"}, "cluster_network_attachments": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213", "id": "0717-fb880975-db45-4459-8548-64e3995ac213", "name": "my-instance-network-attachment", "resource_type": "instance_cluster_network_attachment"}], "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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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": 64, "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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:0717-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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-dedicated-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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "instances": [{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}}, "cluster_network": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573", "id": "0717-da0df18c-7598-4633-a648-fdaac28a5573", "name": "my-cluster-network", "resource_type": "cluster_network"}, "cluster_network_attachments": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213", "id": "0717-fb880975-db45-4459-8548-64e3995ac213", "name": "my-instance-network-attachment", "resource_type": "instance_cluster_network_attachment"}], "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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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": 64, "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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:0717-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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-dedicated-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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "automatic", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -9595,7 +9535,7 @@ def test_list_instances_value_error(self): """ # Set up mock url = preprocess_url('/instances') - mock_response = '{"first": {"href": "href"}, "instances": [{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}}, "cluster_network": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573", "id": "0717-da0df18c-7598-4633-a648-fdaac28a5573", "name": "my-cluster-network", "resource_type": "cluster_network"}, "cluster_network_attachments": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213", "id": "0717-fb880975-db45-4459-8548-64e3995ac213", "name": "my-instance-network-attachment", "resource_type": "instance_cluster_network_attachment"}], "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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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": 64, "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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:0717-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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-dedicated-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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "instances": [{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}}, "cluster_network": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573", "id": "0717-da0df18c-7598-4633-a648-fdaac28a5573", "name": "my-cluster-network", "resource_type": "cluster_network"}, "cluster_network_attachments": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213", "id": "0717-fb880975-db45-4459-8548-64e3995ac213", "name": "my-instance-network-attachment", "resource_type": "instance_cluster_network_attachment"}], "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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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": 64, "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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:0717-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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-dedicated-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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "automatic", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -9605,7 +9545,8 @@ 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()} with pytest.raises(ValueError): @@ -9627,8 +9568,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":"id"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}},"cluster_network":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573","id":"0717-da0df18c-7598-4633-a648-fdaac28a5573","name":"my-cluster-network","resource_type":"cluster_network"},"cluster_network_attachments":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213","id":"0717-fb880975-db45-4459-8548-64e3995ac213","name":"my-instance-network-attachment","resource_type":"instance_cluster_network_attachment"}],"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_e21b7391-2ca2-4ab5-84a8-b92157a633b0","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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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-server-health-status-reasons"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","id":"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","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":64,"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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","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:0717-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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-dedicated-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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"},"reservation_affinity":{"policy":"disabled","pool":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-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":"id"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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":"id"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}},"cluster_network":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573","id":"0717-da0df18c-7598-4633-a648-fdaac28a5573","name":"my-cluster-network","resource_type":"cluster_network"},"cluster_network_attachments":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213","id":"0717-fb880975-db45-4459-8548-64e3995ac213","name":"my-instance-network-attachment","resource_type":"instance_cluster_network_attachment"}],"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_e21b7391-2ca2-4ab5-84a8-b92157a633b0","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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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-server-health-status-reasons"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","id":"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","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":64,"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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","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:0717-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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-dedicated-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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"},"reservation_affinity":{"policy":"disabled","pool":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-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":"id"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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":"id"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}},"cluster_network":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573","id":"0717-da0df18c-7598-4633-a648-fdaac28a5573","name":"my-cluster-network","resource_type":"cluster_network"},"cluster_network_attachments":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213","id":"0717-fb880975-db45-4459-8548-64e3995ac213","name":"my-instance-network-attachment","resource_type":"instance_cluster_network_attachment"}],"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_e21b7391-2ca2-4ab5-84a8-b92157a633b0","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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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-server-health-status-reasons"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","id":"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","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":64,"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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","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:0717-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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-dedicated-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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"},"reservation_affinity":{"policy":"automatic","pool":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-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":"id"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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":"id"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}},"cluster_network":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573","id":"0717-da0df18c-7598-4633-a648-fdaac28a5573","name":"my-cluster-network","resource_type":"cluster_network"},"cluster_network_attachments":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213","id":"0717-fb880975-db45-4459-8548-64e3995ac213","name":"my-instance-network-attachment","resource_type":"instance_cluster_network_attachment"}],"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_e21b7391-2ca2-4ab5-84a8-b92157a633b0","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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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-server-health-status-reasons"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","id":"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","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":64,"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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","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:0717-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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-dedicated-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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"},"reservation_affinity":{"policy":"automatic","pool":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-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":"id"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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, @@ -9658,8 +9599,9 @@ def test_list_instances_with_pager_get_next(self): 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:r006-418fe842-a3e9-47b9-a938-1aa5bd632871', placement_group_name='my-placement-group', + reservation_affinity_policy='automatic', reservation_id='testString', reservation_crn='crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63', reservation_name='my-reservation', @@ -9680,8 +9622,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":"id"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}},"cluster_network":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573","id":"0717-da0df18c-7598-4633-a648-fdaac28a5573","name":"my-cluster-network","resource_type":"cluster_network"},"cluster_network_attachments":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213","id":"0717-fb880975-db45-4459-8548-64e3995ac213","name":"my-instance-network-attachment","resource_type":"instance_cluster_network_attachment"}],"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_e21b7391-2ca2-4ab5-84a8-b92157a633b0","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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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-server-health-status-reasons"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","id":"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","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":64,"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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","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:0717-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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-dedicated-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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"},"reservation_affinity":{"policy":"disabled","pool":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-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":"id"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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":"id"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}},"cluster_network":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573","id":"0717-da0df18c-7598-4633-a648-fdaac28a5573","name":"my-cluster-network","resource_type":"cluster_network"},"cluster_network_attachments":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213","id":"0717-fb880975-db45-4459-8548-64e3995ac213","name":"my-instance-network-attachment","resource_type":"instance_cluster_network_attachment"}],"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_e21b7391-2ca2-4ab5-84a8-b92157a633b0","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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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-server-health-status-reasons"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","id":"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","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":64,"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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","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:0717-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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-dedicated-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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"},"reservation_affinity":{"policy":"disabled","pool":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-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":"id"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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":"id"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}},"cluster_network":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573","id":"0717-da0df18c-7598-4633-a648-fdaac28a5573","name":"my-cluster-network","resource_type":"cluster_network"},"cluster_network_attachments":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213","id":"0717-fb880975-db45-4459-8548-64e3995ac213","name":"my-instance-network-attachment","resource_type":"instance_cluster_network_attachment"}],"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_e21b7391-2ca2-4ab5-84a8-b92157a633b0","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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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-server-health-status-reasons"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","id":"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","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":64,"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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","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:0717-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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-dedicated-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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"},"reservation_affinity":{"policy":"automatic","pool":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-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":"id"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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":"id"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}},"cluster_network":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573","id":"0717-da0df18c-7598-4633-a648-fdaac28a5573","name":"my-cluster-network","resource_type":"cluster_network"},"cluster_network_attachments":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213","id":"0717-fb880975-db45-4459-8548-64e3995ac213","name":"my-instance-network-attachment","resource_type":"instance_cluster_network_attachment"}],"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_e21b7391-2ca2-4ab5-84a8-b92157a633b0","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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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-server-health-status-reasons"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","id":"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","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":64,"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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","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:0717-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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-dedicated-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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"},"reservation_affinity":{"policy":"automatic","pool":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-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":"id"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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, @@ -9710,8 +9652,9 @@ def test_list_instances_with_pager_get_all(self): 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:r006-418fe842-a3e9-47b9-a938-1aa5bd632871', placement_group_name='my-placement-group', + reservation_affinity_policy='automatic', reservation_id='testString', reservation_crn='crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:7187-ba49df72-37b8-43ac-98da-f8e029de0e63', reservation_name='my-reservation', @@ -9736,7 +9679,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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}}, "cluster_network": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573", "id": "0717-da0df18c-7598-4633-a648-fdaac28a5573", "name": "my-cluster-network", "resource_type": "cluster_network"}, "cluster_network_attachments": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213", "id": "0717-fb880975-db45-4459-8548-64e3995ac213", "name": "my-instance-network-attachment", "resource_type": "instance_cluster_network_attachment"}], "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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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": 64, "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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:0717-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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-dedicated-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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}}, "cluster_network": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573", "id": "0717-da0df18c-7598-4633-a648-fdaac28a5573", "name": "my-cluster-network", "resource_type": "cluster_network"}, "cluster_network_attachments": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213", "id": "0717-fb880975-db45-4459-8548-64e3995ac213", "name": "my-instance-network-attachment", "resource_type": "instance_cluster_network_attachment"}], "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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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": 64, "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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:0717-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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-dedicated-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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "automatic", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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, @@ -9762,21 +9705,13 @@ def test_create_instance_all_params(self): # Construct a dict representation of a InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment model instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = ( - 'my-cluster-network-interface' - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = ( - cluster_network_interface_primary_ip_prototype_model - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = ( - cluster_network_subnet_identity_model - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = cluster_network_subnet_identity_model # Construct a dict representation of a InstanceClusterNetworkAttachmentPrototypeInstanceContext model instance_cluster_network_attachment_prototype_instance_context_model = {} - instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_model - ) + instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = instance_cluster_network_attachment_prototype_cluster_network_interface_model instance_cluster_network_attachment_prototype_instance_context_model['name'] = 'my-instance-network-attachment' # Construct a dict representation of a TrustedProfileIdentityById model @@ -9812,7 +9747,7 @@ def test_create_instance_all_params(self): # 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['policy'] = 'automatic' instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] # Construct a dict representation of a ResourceGroupIdentityById model @@ -9861,21 +9796,15 @@ def test_create_instance_all_params(self): 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['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' - ) + 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 = {} @@ -9911,28 +9840,18 @@ def test_create_instance_all_params(self): 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['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['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['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['virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model # Construct a dict representation of a NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext model network_interface_ip_prototype_model = {} @@ -9950,7 +9869,7 @@ def test_create_instance_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'] = '0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' # Construct a dict representation of a ZoneIdentityByName model zone_identity_model = {} @@ -9959,9 +9878,7 @@ 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['cluster_network_attachments'] = [ - instance_cluster_network_attachment_prototype_instance_context_model - ] + instance_prototype_model['cluster_network_attachments'] = [instance_cluster_network_attachment_prototype_instance_context_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 @@ -10018,7 +9935,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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}}, "cluster_network": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573", "id": "0717-da0df18c-7598-4633-a648-fdaac28a5573", "name": "my-cluster-network", "resource_type": "cluster_network"}, "cluster_network_attachments": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213", "id": "0717-fb880975-db45-4459-8548-64e3995ac213", "name": "my-instance-network-attachment", "resource_type": "instance_cluster_network_attachment"}], "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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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": 64, "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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:0717-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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-dedicated-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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}}, "cluster_network": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573", "id": "0717-da0df18c-7598-4633-a648-fdaac28a5573", "name": "my-cluster-network", "resource_type": "cluster_network"}, "cluster_network_attachments": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213", "id": "0717-fb880975-db45-4459-8548-64e3995ac213", "name": "my-instance-network-attachment", "resource_type": "instance_cluster_network_attachment"}], "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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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": 64, "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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:0717-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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-dedicated-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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "automatic", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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, @@ -10044,21 +9961,13 @@ def test_create_instance_value_error(self): # Construct a dict representation of a InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment model instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = ( - 'my-cluster-network-interface' - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = ( - cluster_network_interface_primary_ip_prototype_model - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = ( - cluster_network_subnet_identity_model - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = cluster_network_subnet_identity_model # Construct a dict representation of a InstanceClusterNetworkAttachmentPrototypeInstanceContext model instance_cluster_network_attachment_prototype_instance_context_model = {} - instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_model - ) + instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = instance_cluster_network_attachment_prototype_cluster_network_interface_model instance_cluster_network_attachment_prototype_instance_context_model['name'] = 'my-instance-network-attachment' # Construct a dict representation of a TrustedProfileIdentityById model @@ -10094,7 +10003,7 @@ def test_create_instance_value_error(self): # 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['policy'] = 'automatic' instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] # Construct a dict representation of a ResourceGroupIdentityById model @@ -10143,21 +10052,15 @@ def test_create_instance_value_error(self): 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['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' - ) + 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 = {} @@ -10193,28 +10096,18 @@ def test_create_instance_value_error(self): 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['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['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['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['virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model # Construct a dict representation of a NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext model network_interface_ip_prototype_model = {} @@ -10232,7 +10125,7 @@ def test_create_instance_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'] = '0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' # Construct a dict representation of a ZoneIdentityByName model zone_identity_model = {} @@ -10241,9 +10134,7 @@ 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['cluster_network_attachments'] = [ - instance_cluster_network_attachment_prototype_instance_context_model - ] + instance_prototype_model['cluster_network_attachments'] = [instance_cluster_network_attachment_prototype_instance_context_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 @@ -10414,7 +10305,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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}}, "cluster_network": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573", "id": "0717-da0df18c-7598-4633-a648-fdaac28a5573", "name": "my-cluster-network", "resource_type": "cluster_network"}, "cluster_network_attachments": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213", "id": "0717-fb880975-db45-4459-8548-64e3995ac213", "name": "my-instance-network-attachment", "resource_type": "instance_cluster_network_attachment"}], "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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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": 64, "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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:0717-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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-dedicated-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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}}, "cluster_network": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573", "id": "0717-da0df18c-7598-4633-a648-fdaac28a5573", "name": "my-cluster-network", "resource_type": "cluster_network"}, "cluster_network_attachments": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213", "id": "0717-fb880975-db45-4459-8548-64e3995ac213", "name": "my-instance-network-attachment", "resource_type": "instance_cluster_network_attachment"}], "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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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": 64, "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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:0717-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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-dedicated-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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "automatic", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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, @@ -10452,7 +10343,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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}}, "cluster_network": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573", "id": "0717-da0df18c-7598-4633-a648-fdaac28a5573", "name": "my-cluster-network", "resource_type": "cluster_network"}, "cluster_network_attachments": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213", "id": "0717-fb880975-db45-4459-8548-64e3995ac213", "name": "my-instance-network-attachment", "resource_type": "instance_cluster_network_attachment"}], "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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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": 64, "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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:0717-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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-dedicated-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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}}, "cluster_network": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573", "id": "0717-da0df18c-7598-4633-a648-fdaac28a5573", "name": "my-cluster-network", "resource_type": "cluster_network"}, "cluster_network_attachments": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213", "id": "0717-fb880975-db45-4459-8548-64e3995ac213", "name": "my-instance-network-attachment", "resource_type": "instance_cluster_network_attachment"}], "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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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": 64, "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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:0717-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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-dedicated-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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "automatic", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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, @@ -10495,7 +10386,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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}}, "cluster_network": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573", "id": "0717-da0df18c-7598-4633-a648-fdaac28a5573", "name": "my-cluster-network", "resource_type": "cluster_network"}, "cluster_network_attachments": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213", "id": "0717-fb880975-db45-4459-8548-64e3995ac213", "name": "my-instance-network-attachment", "resource_type": "instance_cluster_network_attachment"}], "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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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": 64, "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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:0717-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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-dedicated-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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}}, "cluster_network": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573", "id": "0717-da0df18c-7598-4633-a648-fdaac28a5573", "name": "my-cluster-network", "resource_type": "cluster_network"}, "cluster_network_attachments": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213", "id": "0717-fb880975-db45-4459-8548-64e3995ac213", "name": "my-instance-network-attachment", "resource_type": "instance_cluster_network_attachment"}], "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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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": 64, "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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:0717-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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-dedicated-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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "automatic", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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, @@ -10528,7 +10419,7 @@ def test_update_instance_all_params(self): # 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['policy'] = 'automatic' instance_reservation_affinity_patch_model['pool'] = [reservation_identity_model] # Construct a dict representation of a InstancePatch model @@ -10579,7 +10470,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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}}, "cluster_network": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573", "id": "0717-da0df18c-7598-4633-a648-fdaac28a5573", "name": "my-cluster-network", "resource_type": "cluster_network"}, "cluster_network_attachments": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213", "id": "0717-fb880975-db45-4459-8548-64e3995ac213", "name": "my-instance-network-attachment", "resource_type": "instance_cluster_network_attachment"}], "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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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": 64, "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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:0717-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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-dedicated-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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}}, "cluster_network": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573", "id": "0717-da0df18c-7598-4633-a648-fdaac28a5573", "name": "my-cluster-network", "resource_type": "cluster_network"}, "cluster_network_attachments": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213", "id": "0717-fb880975-db45-4459-8548-64e3995ac213", "name": "my-instance-network-attachment", "resource_type": "instance_cluster_network_attachment"}], "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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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": 64, "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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:0717-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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-dedicated-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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "automatic", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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, @@ -10612,7 +10503,7 @@ def test_update_instance_required_params(self): # 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['policy'] = 'automatic' instance_reservation_affinity_patch_model['pool'] = [reservation_identity_model] # Construct a dict representation of a InstancePatch model @@ -10661,7 +10552,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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}}, "cluster_network": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573", "id": "0717-da0df18c-7598-4633-a648-fdaac28a5573", "name": "my-cluster-network", "resource_type": "cluster_network"}, "cluster_network_attachments": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213", "id": "0717-fb880975-db45-4459-8548-64e3995ac213", "name": "my-instance-network-attachment", "resource_type": "instance_cluster_network_attachment"}], "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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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": 64, "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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:0717-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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-dedicated-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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "disabled", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}}, "cluster_network": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573", "id": "0717-da0df18c-7598-4633-a648-fdaac28a5573", "name": "my-cluster-network", "resource_type": "cluster_network"}, "cluster_network_attachments": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213", "id": "0717-fb880975-db45-4459-8548-64e3995ac213", "name": "my-instance-network-attachment", "resource_type": "instance_cluster_network_attachment"}], "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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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": 64, "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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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:0717-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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-dedicated-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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "automatic", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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, @@ -10694,7 +10585,7 @@ def test_update_instance_value_error(self): # 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['policy'] = 'automatic' instance_reservation_affinity_patch_model['pool'] = [reservation_identity_model] # Construct a dict representation of a InstancePatch model @@ -11139,15 +11030,9 @@ def test_create_cluster_network_attachment_all_params(self): # Construct a dict representation of a InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment model instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = ( - 'my-cluster-network-interface' - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = ( - cluster_network_interface_primary_ip_prototype_model - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = ( - cluster_network_subnet_identity_model - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = cluster_network_subnet_identity_model # Construct a dict representation of a InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById model instance_cluster_network_attachment_before_prototype_model = {} @@ -11173,10 +11058,7 @@ def test_create_cluster_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['cluster_network_interface'] - == instance_cluster_network_attachment_prototype_cluster_network_interface_model - ) + assert req_body['cluster_network_interface'] == instance_cluster_network_attachment_prototype_cluster_network_interface_model assert req_body['before'] == instance_cluster_network_attachment_before_prototype_model assert req_body['name'] == 'my-instance-network-attachment' @@ -11218,15 +11100,9 @@ def test_create_cluster_network_attachment_value_error(self): # Construct a dict representation of a InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment model instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = ( - 'my-cluster-network-interface' - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = ( - cluster_network_interface_primary_ip_prototype_model - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = ( - cluster_network_subnet_identity_model - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = cluster_network_subnet_identity_model # Construct a dict representation of a InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById model instance_cluster_network_attachment_before_prototype_model = {} @@ -12017,20 +11893,12 @@ def test_create_instance_network_attachment_all_params(self): 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['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['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['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 @@ -12051,10 +11919,7 @@ 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): @@ -12111,20 +11976,12 @@ def test_create_instance_network_attachment_value_error(self): 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['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['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['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 @@ -13253,7 +13110,7 @@ def test_list_instance_network_interface_ips_all_params(self): """ # Set up mock url = preprocess_url('/instances/testString/network_interfaces/testString/ips') - mock_response = '{"first": {"href": "href"}, "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": "provider", "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": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "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": "provider", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -13302,7 +13159,7 @@ def test_list_instance_network_interface_ips_required_params(self): """ # Set up mock url = preprocess_url('/instances/testString/network_interfaces/testString/ips') - mock_response = '{"first": {"href": "href"}, "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": "provider", "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": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "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": "provider", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -13342,7 +13199,7 @@ def test_list_instance_network_interface_ips_value_error(self): """ # Set up mock url = preprocess_url('/instances/testString/network_interfaces/testString/ips') - mock_response = '{"first": {"href": "href"}, "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": "provider", "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": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "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": "provider", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -13381,8 +13238,8 @@ def test_list_instance_network_interface_ips_with_pager_get_next(self): """ # Set up a two-page mock response 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":"provider","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":"provider","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_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":"provider","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","id":"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","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":"provider","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","id":"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","name":"my-endpoint-gateway","resource_type":"endpoint_gateway"}}]}' responses.add( responses.GET, url, @@ -13419,8 +13276,8 @@ def test_list_instance_network_interface_ips_with_pager_get_all(self): """ # Set up a two-page mock response 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":"provider","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":"provider","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_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":"provider","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","id":"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","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":"provider","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","id":"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","name":"my-endpoint-gateway","resource_type":"endpoint_gateway"}}]}' responses.add( responses.GET, url, @@ -13460,7 +13317,7 @@ def test_get_instance_network_interface_ip_all_params(self): """ # Set up mock 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": "provider", "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_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": "provider", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}' responses.add( responses.GET, url, @@ -13502,7 +13359,7 @@ def test_get_instance_network_interface_ip_value_error(self): """ # Set up mock 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": "provider", "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_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": "provider", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}' responses.add( responses.GET, url, @@ -14057,7 +13914,7 @@ def test_list_instance_groups_all_params(self): """ # Set up mock url = preprocess_url('/instance_groups') - mock_response = '{"first": {"href": "href"}, "instance_groups": [{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "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"}, "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", "load_balancer_pool": {"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"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "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"}], "updated_at": "2019-01-01T12:00:00.000Z", "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"}}], "limit": 20, "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "instance_groups": [{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "id": "r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "id": "0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "name": "my-instance-template"}, "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", "load_balancer_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "id": "r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "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"}], "updated_at": "2019-01-01T12:00:00.000Z", "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"}}], "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -14102,7 +13959,7 @@ def test_list_instance_groups_required_params(self): """ # Set up mock url = preprocess_url('/instance_groups') - mock_response = '{"first": {"href": "href"}, "instance_groups": [{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "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"}, "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", "load_balancer_pool": {"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"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "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"}], "updated_at": "2019-01-01T12:00:00.000Z", "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"}}], "limit": 20, "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "instance_groups": [{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "id": "r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "id": "0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "name": "my-instance-template"}, "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", "load_balancer_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "id": "r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "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"}], "updated_at": "2019-01-01T12:00:00.000Z", "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"}}], "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -14134,7 +13991,7 @@ def test_list_instance_groups_value_error(self): """ # Set up mock url = preprocess_url('/instance_groups') - mock_response = '{"first": {"href": "href"}, "instance_groups": [{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "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"}, "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", "load_balancer_pool": {"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"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "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"}], "updated_at": "2019-01-01T12:00:00.000Z", "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"}}], "limit": 20, "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "instance_groups": [{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "id": "r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "id": "0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "name": "my-instance-template"}, "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", "load_balancer_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "id": "r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "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"}], "updated_at": "2019-01-01T12:00:00.000Z", "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"}}], "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -14144,7 +14001,8 @@ 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()} with pytest.raises(ValueError): @@ -14166,8 +14024,8 @@ def test_list_instance_groups_with_pager_get_next(self): """ # Set up a two-page mock response url = preprocess_url('/instance_groups') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"instance_groups":[{"application_port":22,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","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"},"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","load_balancer_pool":{"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"},"managers":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance-group-manager"}],"membership_count":10,"name":"my-instance-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"status":"deleting","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"}],"updated_at":"2019-01-01T12:00:00.000Z","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"}}]}' - mock_response2 = '{"total_count":2,"limit":1,"instance_groups":[{"application_port":22,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","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"},"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","load_balancer_pool":{"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"},"managers":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance-group-manager"}],"membership_count":10,"name":"my-instance-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"status":"deleting","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"}],"updated_at":"2019-01-01T12:00:00.000Z","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"}}]}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"instance_groups":[{"application_port":22,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60","id":"r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60","instance_template":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2","id":"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2","name":"my-instance-template"},"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","load_balancer_pool":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004","id":"r006-70294e14-4e61-11e8-bcf4-0242ac110004","name":"my-load-balancer-pool"},"managers":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea","id":"r006-bd21f31f-8a05-4451-836d-ab0347e91fea","name":"my-instance-group-manager"}],"membership_count":10,"name":"my-instance-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"status":"deleting","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"}],"updated_at":"2019-01-01T12:00:00.000Z","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"}}]}' + mock_response2 = '{"total_count":2,"limit":1,"instance_groups":[{"application_port":22,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60","id":"r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60","instance_template":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2","id":"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2","name":"my-instance-template"},"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","load_balancer_pool":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004","id":"r006-70294e14-4e61-11e8-bcf4-0242ac110004","name":"my-load-balancer-pool"},"managers":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea","id":"r006-bd21f31f-8a05-4451-836d-ab0347e91fea","name":"my-instance-group-manager"}],"membership_count":10,"name":"my-instance-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"status":"deleting","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"}],"updated_at":"2019-01-01T12:00:00.000Z","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"}}]}' responses.add( responses.GET, url, @@ -14202,8 +14060,8 @@ def test_list_instance_groups_with_pager_get_all(self): """ # Set up a two-page mock response url = preprocess_url('/instance_groups') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"instance_groups":[{"application_port":22,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","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"},"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","load_balancer_pool":{"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"},"managers":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance-group-manager"}],"membership_count":10,"name":"my-instance-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"status":"deleting","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"}],"updated_at":"2019-01-01T12:00:00.000Z","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"}}]}' - mock_response2 = '{"total_count":2,"limit":1,"instance_groups":[{"application_port":22,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","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"},"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","load_balancer_pool":{"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"},"managers":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance-group-manager"}],"membership_count":10,"name":"my-instance-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"status":"deleting","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"}],"updated_at":"2019-01-01T12:00:00.000Z","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"}}]}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"instance_groups":[{"application_port":22,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60","id":"r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60","instance_template":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2","id":"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2","name":"my-instance-template"},"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","load_balancer_pool":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004","id":"r006-70294e14-4e61-11e8-bcf4-0242ac110004","name":"my-load-balancer-pool"},"managers":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea","id":"r006-bd21f31f-8a05-4451-836d-ab0347e91fea","name":"my-instance-group-manager"}],"membership_count":10,"name":"my-instance-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"status":"deleting","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"}],"updated_at":"2019-01-01T12:00:00.000Z","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"}}]}' + mock_response2 = '{"total_count":2,"limit":1,"instance_groups":[{"application_port":22,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60","id":"r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60","instance_template":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2","id":"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2","name":"my-instance-template"},"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","load_balancer_pool":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004","id":"r006-70294e14-4e61-11e8-bcf4-0242ac110004","name":"my-load-balancer-pool"},"managers":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea","id":"r006-bd21f31f-8a05-4451-836d-ab0347e91fea","name":"my-instance-group-manager"}],"membership_count":10,"name":"my-instance-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"status":"deleting","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"}],"updated_at":"2019-01-01T12:00:00.000Z","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"}}]}' responses.add( responses.GET, url, @@ -14241,7 +14099,7 @@ def test_create_instance_group_all_params(self): """ # Set up mock url = preprocess_url('/instance_groups') - mock_response = '{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "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"}, "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", "load_balancer_pool": {"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"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "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"}], "updated_at": "2019-01-01T12:00:00.000Z", "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"}}' + mock_response = '{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "id": "r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "id": "0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "name": "my-instance-template"}, "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", "load_balancer_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "id": "r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "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"}], "updated_at": "2019-01-01T12:00:00.000Z", "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"}}' responses.add( responses.POST, url, @@ -14252,7 +14110,7 @@ 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'] = '0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} @@ -14260,11 +14118,11 @@ def test_create_instance_group_all_params(self): # 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'] = 'r006-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'] = 'r006-70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -14323,7 +14181,7 @@ def test_create_instance_group_value_error(self): """ # Set up mock url = preprocess_url('/instance_groups') - mock_response = '{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "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"}, "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", "load_balancer_pool": {"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"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "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"}], "updated_at": "2019-01-01T12:00:00.000Z", "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"}}' + mock_response = '{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "id": "r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "id": "0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "name": "my-instance-template"}, "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", "load_balancer_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "id": "r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "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"}], "updated_at": "2019-01-01T12:00:00.000Z", "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"}}' responses.add( responses.POST, url, @@ -14334,7 +14192,7 @@ 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'] = '0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} @@ -14342,11 +14200,11 @@ def test_create_instance_group_value_error(self): # 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'] = 'r006-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'] = 'r006-70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -14469,7 +14327,7 @@ def test_get_instance_group_all_params(self): """ # Set up mock url = preprocess_url('/instance_groups/testString') - mock_response = '{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "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"}, "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", "load_balancer_pool": {"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"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "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"}], "updated_at": "2019-01-01T12:00:00.000Z", "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"}}' + mock_response = '{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "id": "r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "id": "0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "name": "my-instance-template"}, "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", "load_balancer_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "id": "r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "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"}], "updated_at": "2019-01-01T12:00:00.000Z", "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"}}' responses.add( responses.GET, url, @@ -14507,7 +14365,7 @@ def test_get_instance_group_value_error(self): """ # Set up mock url = preprocess_url('/instance_groups/testString') - mock_response = '{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "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"}, "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", "load_balancer_pool": {"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"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "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"}], "updated_at": "2019-01-01T12:00:00.000Z", "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"}}' + mock_response = '{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "id": "r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "id": "0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "name": "my-instance-template"}, "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", "load_balancer_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "id": "r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "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"}], "updated_at": "2019-01-01T12:00:00.000Z", "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"}}' responses.add( responses.GET, url, @@ -14550,7 +14408,7 @@ def test_update_instance_group_all_params(self): """ # Set up mock url = preprocess_url('/instance_groups/testString') - mock_response = '{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "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"}, "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", "load_balancer_pool": {"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"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "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"}], "updated_at": "2019-01-01T12:00:00.000Z", "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"}}' + mock_response = '{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "id": "r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "id": "0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "name": "my-instance-template"}, "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", "load_balancer_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "id": "r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "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"}], "updated_at": "2019-01-01T12:00:00.000Z", "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"}}' responses.add( responses.PATCH, url, @@ -14561,15 +14419,15 @@ 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'] = '0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' # 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'] = 'r006-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'] = 'r006-70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} @@ -14581,7 +14439,7 @@ def test_update_instance_group_all_params(self): 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['membership_count'] = 20 instance_group_patch_model['name'] = 'my-instance-group' instance_group_patch_model['subnets'] = [subnet_identity_model] @@ -14619,7 +14477,7 @@ def test_update_instance_group_value_error(self): """ # Set up mock url = preprocess_url('/instance_groups/testString') - mock_response = '{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "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"}, "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", "load_balancer_pool": {"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"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "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"}], "updated_at": "2019-01-01T12:00:00.000Z", "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"}}' + mock_response = '{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "id": "r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "id": "0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "name": "my-instance-template"}, "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", "load_balancer_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "managers": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "id": "r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "name": "my-instance-group-manager"}], "membership_count": 10, "name": "my-instance-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "deleting", "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"}], "updated_at": "2019-01-01T12:00:00.000Z", "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"}}' responses.add( responses.PATCH, url, @@ -14630,15 +14488,15 @@ 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'] = '0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' # 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'] = 'r006-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'] = 'r006-70294e14-4e61-11e8-bcf4-0242ac110004' # Construct a dict representation of a SubnetIdentityById model subnet_identity_model = {} @@ -14650,7 +14508,7 @@ def test_update_instance_group_value_error(self): 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['membership_count'] = 20 instance_group_patch_model['name'] = 'my-instance-group' instance_group_patch_model['subnets'] = [subnet_identity_model] @@ -14765,7 +14623,7 @@ def test_list_instance_group_managers_all_params(self): """ # Set up mock url = preprocess_url('/instance_groups/testString/managers') - mock_response = '{"first": {"href": "href"}, "limit": 20, "managers": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "management_enabled": true, "name": "my-instance-group-manager", "updated_at": "2019-01-01T12:00:00.000Z", "aggregation_window": 120, "cooldown": 210, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "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"}]}], "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "managers": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "id": "r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "management_enabled": true, "name": "my-instance-group-manager", "updated_at": "2019-01-01T12:00:00.000Z", "aggregation_window": 120, "cooldown": 210, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "id": "r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "name": "my-instance-group-manager-policy"}]}], "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -14812,7 +14670,7 @@ def test_list_instance_group_managers_required_params(self): """ # Set up mock url = preprocess_url('/instance_groups/testString/managers') - mock_response = '{"first": {"href": "href"}, "limit": 20, "managers": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "management_enabled": true, "name": "my-instance-group-manager", "updated_at": "2019-01-01T12:00:00.000Z", "aggregation_window": 120, "cooldown": 210, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "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"}]}], "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "managers": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "id": "r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "management_enabled": true, "name": "my-instance-group-manager", "updated_at": "2019-01-01T12:00:00.000Z", "aggregation_window": 120, "cooldown": 210, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "id": "r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "name": "my-instance-group-manager-policy"}]}], "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -14850,7 +14708,7 @@ def test_list_instance_group_managers_value_error(self): """ # Set up mock url = preprocess_url('/instance_groups/testString/managers') - mock_response = '{"first": {"href": "href"}, "limit": 20, "managers": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "management_enabled": true, "name": "my-instance-group-manager", "updated_at": "2019-01-01T12:00:00.000Z", "aggregation_window": 120, "cooldown": 210, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "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"}]}], "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "managers": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "id": "r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "management_enabled": true, "name": "my-instance-group-manager", "updated_at": "2019-01-01T12:00:00.000Z", "aggregation_window": 120, "cooldown": 210, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "id": "r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "name": "my-instance-group-manager-policy"}]}], "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -14887,8 +14745,8 @@ def test_list_instance_group_managers_with_pager_get_next(self): """ # Set up a two-page mock response url = preprocess_url('/instance_groups/testString/managers') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"managers":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","management_enabled":true,"name":"my-instance-group-manager","updated_at":"2019-01-01T12:00:00.000Z","aggregation_window":120,"cooldown":210,"manager_type":"autoscale","max_membership_count":10,"min_membership_count":10,"policies":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"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"}]}]}' - mock_response2 = '{"total_count":2,"limit":1,"managers":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","management_enabled":true,"name":"my-instance-group-manager","updated_at":"2019-01-01T12:00:00.000Z","aggregation_window":120,"cooldown":210,"manager_type":"autoscale","max_membership_count":10,"min_membership_count":10,"policies":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"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"}]}]}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"managers":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea","id":"r006-bd21f31f-8a05-4451-836d-ab0347e91fea","management_enabled":true,"name":"my-instance-group-manager","updated_at":"2019-01-01T12:00:00.000Z","aggregation_window":120,"cooldown":210,"manager_type":"autoscale","max_membership_count":10,"min_membership_count":10,"policies":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7","id":"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7","name":"my-instance-group-manager-policy"}]}]}' + mock_response2 = '{"total_count":2,"limit":1,"managers":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea","id":"r006-bd21f31f-8a05-4451-836d-ab0347e91fea","management_enabled":true,"name":"my-instance-group-manager","updated_at":"2019-01-01T12:00:00.000Z","aggregation_window":120,"cooldown":210,"manager_type":"autoscale","max_membership_count":10,"min_membership_count":10,"policies":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7","id":"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7","name":"my-instance-group-manager-policy"}]}]}' responses.add( responses.GET, url, @@ -14924,8 +14782,8 @@ def test_list_instance_group_managers_with_pager_get_all(self): """ # Set up a two-page mock response url = preprocess_url('/instance_groups/testString/managers') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"managers":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","management_enabled":true,"name":"my-instance-group-manager","updated_at":"2019-01-01T12:00:00.000Z","aggregation_window":120,"cooldown":210,"manager_type":"autoscale","max_membership_count":10,"min_membership_count":10,"policies":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"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"}]}]}' - mock_response2 = '{"total_count":2,"limit":1,"managers":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","management_enabled":true,"name":"my-instance-group-manager","updated_at":"2019-01-01T12:00:00.000Z","aggregation_window":120,"cooldown":210,"manager_type":"autoscale","max_membership_count":10,"min_membership_count":10,"policies":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"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"}]}]}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"managers":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea","id":"r006-bd21f31f-8a05-4451-836d-ab0347e91fea","management_enabled":true,"name":"my-instance-group-manager","updated_at":"2019-01-01T12:00:00.000Z","aggregation_window":120,"cooldown":210,"manager_type":"autoscale","max_membership_count":10,"min_membership_count":10,"policies":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7","id":"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7","name":"my-instance-group-manager-policy"}]}]}' + mock_response2 = '{"total_count":2,"limit":1,"managers":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea","id":"r006-bd21f31f-8a05-4451-836d-ab0347e91fea","management_enabled":true,"name":"my-instance-group-manager","updated_at":"2019-01-01T12:00:00.000Z","aggregation_window":120,"cooldown":210,"manager_type":"autoscale","max_membership_count":10,"min_membership_count":10,"policies":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7","id":"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7","name":"my-instance-group-manager-policy"}]}]}' responses.add( responses.GET, url, @@ -14964,7 +14822,7 @@ def test_create_instance_group_manager_all_params(self): """ # Set up mock url = preprocess_url('/instance_groups/testString/managers') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "management_enabled": true, "name": "my-instance-group-manager", "updated_at": "2019-01-01T12:00:00.000Z", "aggregation_window": 120, "cooldown": 210, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "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"}]}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "id": "r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "management_enabled": true, "name": "my-instance-group-manager", "updated_at": "2019-01-01T12:00:00.000Z", "aggregation_window": 120, "cooldown": 210, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "id": "r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "name": "my-instance-group-manager-policy"}]}' responses.add( responses.POST, url, @@ -15017,7 +14875,7 @@ def test_create_instance_group_manager_value_error(self): """ # Set up mock url = preprocess_url('/instance_groups/testString/managers') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "management_enabled": true, "name": "my-instance-group-manager", "updated_at": "2019-01-01T12:00:00.000Z", "aggregation_window": 120, "cooldown": 210, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "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"}]}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "id": "r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "management_enabled": true, "name": "my-instance-group-manager", "updated_at": "2019-01-01T12:00:00.000Z", "aggregation_window": 120, "cooldown": 210, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "id": "r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "name": "my-instance-group-manager-policy"}]}' responses.add( responses.POST, url, @@ -15151,7 +15009,7 @@ def test_get_instance_group_manager_all_params(self): """ # Set up mock url = preprocess_url('/instance_groups/testString/managers/testString') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "management_enabled": true, "name": "my-instance-group-manager", "updated_at": "2019-01-01T12:00:00.000Z", "aggregation_window": 120, "cooldown": 210, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "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"}]}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "id": "r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "management_enabled": true, "name": "my-instance-group-manager", "updated_at": "2019-01-01T12:00:00.000Z", "aggregation_window": 120, "cooldown": 210, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "id": "r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "name": "my-instance-group-manager-policy"}]}' responses.add( responses.GET, url, @@ -15191,7 +15049,7 @@ def test_get_instance_group_manager_value_error(self): """ # Set up mock url = preprocess_url('/instance_groups/testString/managers/testString') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "management_enabled": true, "name": "my-instance-group-manager", "updated_at": "2019-01-01T12:00:00.000Z", "aggregation_window": 120, "cooldown": 210, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "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"}]}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "id": "r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "management_enabled": true, "name": "my-instance-group-manager", "updated_at": "2019-01-01T12:00:00.000Z", "aggregation_window": 120, "cooldown": 210, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "id": "r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "name": "my-instance-group-manager-policy"}]}' responses.add( responses.GET, url, @@ -15236,7 +15094,7 @@ def test_update_instance_group_manager_all_params(self): """ # Set up mock url = preprocess_url('/instance_groups/testString/managers/testString') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "management_enabled": true, "name": "my-instance-group-manager", "updated_at": "2019-01-01T12:00:00.000Z", "aggregation_window": 120, "cooldown": 210, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "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"}]}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "id": "r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "management_enabled": true, "name": "my-instance-group-manager", "updated_at": "2019-01-01T12:00:00.000Z", "aggregation_window": 120, "cooldown": 210, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "id": "r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "name": "my-instance-group-manager-policy"}]}' responses.add( responses.PATCH, url, @@ -15249,7 +15107,7 @@ def test_update_instance_group_manager_all_params(self): instance_group_manager_patch_model = {} instance_group_manager_patch_model['aggregation_window'] = 120 instance_group_manager_patch_model['cooldown'] = 210 - instance_group_manager_patch_model['management_enabled'] = True + instance_group_manager_patch_model['management_enabled'] = False instance_group_manager_patch_model['max_membership_count'] = 10 instance_group_manager_patch_model['min_membership_count'] = 10 instance_group_manager_patch_model['name'] = 'my-instance-group-manager' @@ -15290,7 +15148,7 @@ def test_update_instance_group_manager_value_error(self): """ # Set up mock url = preprocess_url('/instance_groups/testString/managers/testString') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "management_enabled": true, "name": "my-instance-group-manager", "updated_at": "2019-01-01T12:00:00.000Z", "aggregation_window": 120, "cooldown": 210, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "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"}]}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "id": "r006-bd21f31f-8a05-4451-836d-ab0347e91fea", "management_enabled": true, "name": "my-instance-group-manager", "updated_at": "2019-01-01T12:00:00.000Z", "aggregation_window": 120, "cooldown": 210, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "id": "r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "name": "my-instance-group-manager-policy"}]}' responses.add( responses.PATCH, url, @@ -15303,7 +15161,7 @@ def test_update_instance_group_manager_value_error(self): instance_group_manager_patch_model = {} instance_group_manager_patch_model['aggregation_window'] = 120 instance_group_manager_patch_model['cooldown'] = 210 - instance_group_manager_patch_model['management_enabled'] = True + instance_group_manager_patch_model['management_enabled'] = False instance_group_manager_patch_model['max_membership_count'] = 10 instance_group_manager_patch_model['min_membership_count'] = 10 instance_group_manager_patch_model['name'] = 'my-instance-group-manager' @@ -15346,7 +15204,7 @@ def test_list_instance_group_manager_actions_all_params(self): """ # Set up mock 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": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' + 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/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7", "id": "r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7", "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": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -15395,7 +15253,7 @@ def test_list_instance_group_manager_actions_required_params(self): """ # Set up mock 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": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' + 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/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7", "id": "r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7", "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": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -15435,7 +15293,7 @@ def test_list_instance_group_manager_actions_value_error(self): """ # Set up mock 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": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' + 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/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7", "id": "r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7", "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": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -15474,8 +15332,8 @@ def test_list_instance_group_manager_actions_with_pager_get_next(self): """ # Set up a two-page mock response 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}}]}' + 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/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7","id":"r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7","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/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7","id":"r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7","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, url, @@ -15512,8 +15370,8 @@ def test_list_instance_group_manager_actions_with_pager_get_all(self): """ # Set up a two-page mock response 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}}]}' + 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/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7","id":"r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7","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/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7","id":"r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7","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, url, @@ -15553,7 +15411,7 @@ def test_create_instance_group_manager_action_all_params(self): """ # Set up mock 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}}' + 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/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7", "id": "r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7", "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, url, @@ -15570,9 +15428,7 @@ def test_create_instance_group_manager_action_all_params(self): 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['group'] = instance_group_manager_scheduled_action_group_prototype_model # Set up parameter values instance_group_id = 'testString' @@ -15610,7 +15466,7 @@ def test_create_instance_group_manager_action_value_error(self): """ # Set up mock 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}}' + 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/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7", "id": "r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7", "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, url, @@ -15627,9 +15483,7 @@ def test_create_instance_group_manager_action_value_error(self): 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['group'] = instance_group_manager_scheduled_action_group_prototype_model # Set up parameter values instance_group_id = 'testString' @@ -15752,7 +15606,7 @@ def test_get_instance_group_manager_action_all_params(self): """ # Set up mock 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}}' + 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/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7", "id": "r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7", "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, url, @@ -15794,7 +15648,7 @@ def test_get_instance_group_manager_action_value_error(self): """ # Set up mock 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}}' + 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/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7", "id": "r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7", "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, url, @@ -15841,7 +15695,7 @@ def test_update_instance_group_manager_action_all_params(self): """ # Set up mock 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}}' + 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/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7", "id": "r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7", "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, url, @@ -15861,7 +15715,7 @@ def test_update_instance_group_manager_action_all_params(self): # Construct a dict representation of a InstanceGroupManagerActionPatch model instance_group_manager_action_patch_model = {} - instance_group_manager_action_patch_model['auto_delete'] = True + instance_group_manager_action_patch_model['auto_delete'] = False instance_group_manager_action_patch_model['auto_delete_timeout'] = 24 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 @@ -15907,7 +15761,7 @@ def test_update_instance_group_manager_action_value_error(self): """ # Set up mock 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}}' + 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/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7", "id": "r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7", "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, url, @@ -15927,7 +15781,7 @@ def test_update_instance_group_manager_action_value_error(self): # Construct a dict representation of a InstanceGroupManagerActionPatch model instance_group_manager_action_patch_model = {} - instance_group_manager_action_patch_model['auto_delete'] = True + instance_group_manager_action_patch_model['auto_delete'] = False instance_group_manager_action_patch_model['auto_delete_timeout'] = 24 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 @@ -15975,7 +15829,7 @@ def test_list_instance_group_manager_policies_all_params(self): """ # Set up mock url = preprocess_url('/instance_groups/testString/managers/testString/policies') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "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}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "policies": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "id": "r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "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, url, @@ -16024,7 +15878,7 @@ def test_list_instance_group_manager_policies_required_params(self): """ # Set up mock url = preprocess_url('/instance_groups/testString/managers/testString/policies') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "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}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "policies": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "id": "r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "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, url, @@ -16064,7 +15918,7 @@ def test_list_instance_group_manager_policies_value_error(self): """ # Set up mock url = preprocess_url('/instance_groups/testString/managers/testString/policies') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "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}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "policies": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "id": "r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "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, url, @@ -16103,8 +15957,8 @@ def test_list_instance_group_manager_policies_with_pager_get_next(self): """ # Set up a two-page mock response 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"}]}' + 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/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7","id":"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7","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/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7","id":"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7","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, url, @@ -16141,8 +15995,8 @@ def test_list_instance_group_manager_policies_with_pager_get_all(self): """ # Set up a two-page mock response 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"}]}' + 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/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7","id":"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7","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/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7","id":"r006-ca664290-30eb-4ad7-9fb6-db45731f0be7","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, url, @@ -16182,7 +16036,7 @@ def test_create_instance_group_manager_policy_all_params(self): """ # Set up mock 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"}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "id": "r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "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, url, @@ -16234,7 +16088,7 @@ def test_create_instance_group_manager_policy_value_error(self): """ # Set up mock 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"}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "id": "r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "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, url, @@ -16371,7 +16225,7 @@ def test_get_instance_group_manager_policy_all_params(self): """ # Set up mock 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"}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "id": "r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "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, url, @@ -16413,7 +16267,7 @@ def test_get_instance_group_manager_policy_value_error(self): """ # Set up mock 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"}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "id": "r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "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, url, @@ -16460,7 +16314,7 @@ def test_update_instance_group_manager_policy_all_params(self): """ # Set up mock 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"}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "id": "r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "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, url, @@ -16472,7 +16326,7 @@ def test_update_instance_group_manager_policy_all_params(self): # Construct a dict representation of a InstanceGroupManagerPolicyPatch model 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['metric_value'] = 75 instance_group_manager_policy_patch_model['name'] = 'my-instance-group-manager-policy' # Set up parameter values @@ -16513,7 +16367,7 @@ def test_update_instance_group_manager_policy_value_error(self): """ # Set up mock 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"}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "id": "r006-ca664290-30eb-4ad7-9fb6-db45731f0be7", "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, url, @@ -16525,7 +16379,7 @@ def test_update_instance_group_manager_policy_value_error(self): # Construct a dict representation of a InstanceGroupManagerPolicyPatch model 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['metric_value'] = 75 instance_group_manager_policy_patch_model['name'] = 'my-instance-group-manager-policy' # Set up parameter values @@ -16643,7 +16497,7 @@ def test_list_instance_group_memberships_all_params(self): """ # Set up mock url = preprocess_url('/instance_groups/testString/memberships') - mock_response = '{"first": {"href": "href"}, "limit": 20, "memberships": [{"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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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"}], "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "memberships": [{"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/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/r006-32c8210b-fd1a-409f-8966-de85bbfd3741", "id": "r006-32c8210b-fd1a-409f-8966-de85bbfd3741", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "name": "my-instance"}, "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "id": "0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "id": "r006-4a4b345f-cf6b-4326-8202-6d8229e9833a"}, "status": "deleting", "updated_at": "2019-01-01T12:00:00.000Z"}], "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -16690,7 +16544,7 @@ def test_list_instance_group_memberships_required_params(self): """ # Set up mock url = preprocess_url('/instance_groups/testString/memberships') - mock_response = '{"first": {"href": "href"}, "limit": 20, "memberships": [{"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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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"}], "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "memberships": [{"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/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/r006-32c8210b-fd1a-409f-8966-de85bbfd3741", "id": "r006-32c8210b-fd1a-409f-8966-de85bbfd3741", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "name": "my-instance"}, "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "id": "0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "id": "r006-4a4b345f-cf6b-4326-8202-6d8229e9833a"}, "status": "deleting", "updated_at": "2019-01-01T12:00:00.000Z"}], "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -16728,7 +16582,7 @@ def test_list_instance_group_memberships_value_error(self): """ # Set up mock url = preprocess_url('/instance_groups/testString/memberships') - mock_response = '{"first": {"href": "href"}, "limit": 20, "memberships": [{"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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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"}], "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "memberships": [{"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/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/r006-32c8210b-fd1a-409f-8966-de85bbfd3741", "id": "r006-32c8210b-fd1a-409f-8966-de85bbfd3741", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "name": "my-instance"}, "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "id": "0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "id": "r006-4a4b345f-cf6b-4326-8202-6d8229e9833a"}, "status": "deleting", "updated_at": "2019-01-01T12:00:00.000Z"}], "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -16765,8 +16619,8 @@ def test_list_instance_group_memberships_with_pager_get_next(self): """ # Set up a two-page mock response url = preprocess_url('/instance_groups/testString/memberships') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"memberships":[{"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_e21b7391-2ca2-4ab5-84a8-b92157a633b0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","id":"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","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"}]}' - mock_response2 = '{"total_count":2,"limit":1,"memberships":[{"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_e21b7391-2ca2-4ab5-84a8-b92157a633b0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","id":"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","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"}]}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"memberships":[{"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/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/r006-32c8210b-fd1a-409f-8966-de85bbfd3741","id":"r006-32c8210b-fd1a-409f-8966-de85bbfd3741","instance":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","id":"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","name":"my-instance"},"instance_template":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2","id":"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2","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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a","id":"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a"},"status":"deleting","updated_at":"2019-01-01T12:00:00.000Z"}]}' + mock_response2 = '{"total_count":2,"limit":1,"memberships":[{"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/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/r006-32c8210b-fd1a-409f-8966-de85bbfd3741","id":"r006-32c8210b-fd1a-409f-8966-de85bbfd3741","instance":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","id":"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","name":"my-instance"},"instance_template":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2","id":"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2","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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a","id":"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a"},"status":"deleting","updated_at":"2019-01-01T12:00:00.000Z"}]}' responses.add( responses.GET, url, @@ -16802,8 +16656,8 @@ def test_list_instance_group_memberships_with_pager_get_all(self): """ # Set up a two-page mock response url = preprocess_url('/instance_groups/testString/memberships') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"memberships":[{"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_e21b7391-2ca2-4ab5-84a8-b92157a633b0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","id":"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","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"}]}' - mock_response2 = '{"total_count":2,"limit":1,"memberships":[{"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_e21b7391-2ca2-4ab5-84a8-b92157a633b0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","id":"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","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"}]}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"memberships":[{"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/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/r006-32c8210b-fd1a-409f-8966-de85bbfd3741","id":"r006-32c8210b-fd1a-409f-8966-de85bbfd3741","instance":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","id":"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","name":"my-instance"},"instance_template":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2","id":"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2","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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a","id":"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a"},"status":"deleting","updated_at":"2019-01-01T12:00:00.000Z"}]}' + mock_response2 = '{"total_count":2,"limit":1,"memberships":[{"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/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/r006-32c8210b-fd1a-409f-8966-de85bbfd3741","id":"r006-32c8210b-fd1a-409f-8966-de85bbfd3741","instance":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","id":"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","name":"my-instance"},"instance_template":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2","id":"0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2","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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a","id":"r006-4a4b345f-cf6b-4326-8202-6d8229e9833a"},"status":"deleting","updated_at":"2019-01-01T12:00:00.000Z"}]}' responses.add( responses.GET, url, @@ -16921,7 +16775,7 @@ def test_get_instance_group_membership_all_params(self): """ # Set up mock 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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"}' + 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/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/r006-32c8210b-fd1a-409f-8966-de85bbfd3741", "id": "r006-32c8210b-fd1a-409f-8966-de85bbfd3741", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "name": "my-instance"}, "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "id": "0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "id": "r006-4a4b345f-cf6b-4326-8202-6d8229e9833a"}, "status": "deleting", "updated_at": "2019-01-01T12:00:00.000Z"}' responses.add( responses.GET, url, @@ -16961,7 +16815,7 @@ def test_get_instance_group_membership_value_error(self): """ # Set up mock 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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"}' + 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/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/r006-32c8210b-fd1a-409f-8966-de85bbfd3741", "id": "r006-32c8210b-fd1a-409f-8966-de85bbfd3741", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "name": "my-instance"}, "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "id": "0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "id": "r006-4a4b345f-cf6b-4326-8202-6d8229e9833a"}, "status": "deleting", "updated_at": "2019-01-01T12:00:00.000Z"}' responses.add( responses.GET, url, @@ -17006,7 +16860,7 @@ def test_update_instance_group_membership_all_params(self): """ # Set up mock 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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"}' + 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/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/r006-32c8210b-fd1a-409f-8966-de85bbfd3741", "id": "r006-32c8210b-fd1a-409f-8966-de85bbfd3741", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "name": "my-instance"}, "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "id": "0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "id": "r006-4a4b345f-cf6b-4326-8202-6d8229e9833a"}, "status": "deleting", "updated_at": "2019-01-01T12:00:00.000Z"}' responses.add( responses.PATCH, url, @@ -17017,7 +16871,7 @@ 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['delete_instance_on_membership_delete'] = True + instance_group_membership_patch_model['delete_instance_on_membership_delete'] = False instance_group_membership_patch_model['name'] = 'my-instance-group-membership' # Set up parameter values @@ -17056,7 +16910,7 @@ def test_update_instance_group_membership_value_error(self): """ # Set up mock 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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"}' + 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/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/r006-32c8210b-fd1a-409f-8966-de85bbfd3741", "id": "r006-32c8210b-fd1a-409f-8966-de85bbfd3741", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "name": "my-instance"}, "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "id": "0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2", "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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "id": "r006-4a4b345f-cf6b-4326-8202-6d8229e9833a"}, "status": "deleting", "updated_at": "2019-01-01T12:00:00.000Z"}' responses.add( responses.PATCH, url, @@ -17067,7 +16921,7 @@ 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['delete_instance_on_membership_delete'] = True + instance_group_membership_patch_model['delete_instance_on_membership_delete'] = False instance_group_membership_patch_model['name'] = 'my-instance-group-membership' # Set up parameter values @@ -17165,7 +17019,7 @@ def test_list_reservations_all_params(self): """ # Set up mock url = preprocess_url('/reservations') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "reservations": [{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 8, "status": "allocated", "total": 10, "used": 2}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "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": "href"}, "limit": 20, "next": {"href": "href"}, "reservations": [{"affinity_policy": "automatic", "capacity": {"allocated": 10, "available": 8, "status": "allocated", "total": 10, "used": 2}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "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, @@ -17178,6 +17032,8 @@ def test_list_reservations_all_params(self): start = 'testString' limit = 50 name = 'my-name' + profile_resource_type = 'testString' + affinity_policy = 'automatic' resource_group_id = 'testString' zone_name = 'us-south-1' @@ -17186,6 +17042,8 @@ def test_list_reservations_all_params(self): start=start, limit=limit, name=name, + profile_resource_type=profile_resource_type, + affinity_policy=affinity_policy, resource_group_id=resource_group_id, zone_name=zone_name, headers={}, @@ -17200,6 +17058,8 @@ def test_list_reservations_all_params(self): assert 'start={}'.format(start) in query_string assert 'limit={}'.format(limit) in query_string assert 'name={}'.format(name) in query_string + assert 'profile.resource_type={}'.format(profile_resource_type) in query_string + assert 'affinity_policy={}'.format(affinity_policy) in query_string assert 'resource_group.id={}'.format(resource_group_id) in query_string assert 'zone.name={}'.format(zone_name) in query_string @@ -17219,7 +17079,7 @@ def test_list_reservations_required_params(self): """ # Set up mock url = preprocess_url('/reservations') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "reservations": [{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 8, "status": "allocated", "total": 10, "used": 2}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "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": "href"}, "limit": 20, "next": {"href": "href"}, "reservations": [{"affinity_policy": "automatic", "capacity": {"allocated": 10, "available": 8, "status": "allocated", "total": 10, "used": 2}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "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, @@ -17251,7 +17111,7 @@ def test_list_reservations_value_error(self): """ # Set up mock url = preprocess_url('/reservations') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "reservations": [{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 8, "status": "allocated", "total": 10, "used": 2}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "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": "href"}, "limit": 20, "next": {"href": "href"}, "reservations": [{"affinity_policy": "automatic", "capacity": {"allocated": 10, "available": 8, "status": "allocated", "total": 10, "used": 2}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "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, @@ -17261,7 +17121,8 @@ 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()} with pytest.raises(ValueError): @@ -17283,8 +17144,8 @@ def test_list_reservations_with_pager_get_next(self): """ # Set up a two-page mock response url = preprocess_url('/reservations') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"reservations":[{"affinity_policy":"restricted","capacity":{"allocated":10,"available":8,"status":"allocated","total":10,"used":2},"committed_use":{"expiration_at":"2019-01-01T12:00:00.000Z","expiration_policy":"release","term":"term"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63","href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-ba49df72-37b8-43ac-98da-f8e029de0e63","lifecycle_state":"stable","name":"my-reservation","profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"reservation","status":"activating","status_reasons":[{"code":"cannot_activate_no_capacity_available","message":"The reservation cannot be activated because capacity is unavailable","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}],"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 = '{"reservations":[{"affinity_policy":"restricted","capacity":{"allocated":10,"available":8,"status":"allocated","total":10,"used":2},"committed_use":{"expiration_at":"2019-01-01T12:00:00.000Z","expiration_policy":"release","term":"term"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63","href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-ba49df72-37b8-43ac-98da-f8e029de0e63","lifecycle_state":"stable","name":"my-reservation","profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"reservation","status":"activating","status_reasons":[{"code":"cannot_activate_no_capacity_available","message":"The reservation cannot be activated because capacity is unavailable","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}],"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"},"reservations":[{"affinity_policy":"automatic","capacity":{"allocated":10,"available":8,"status":"allocated","total":10,"used":2},"committed_use":{"expiration_at":"2019-01-01T12:00:00.000Z","expiration_policy":"release","term":"term"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63","href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-ba49df72-37b8-43ac-98da-f8e029de0e63","lifecycle_state":"stable","name":"my-reservation","profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"reservation","status":"activating","status_reasons":[{"code":"cannot_activate_no_capacity_available","message":"The reservation cannot be activated because capacity is unavailable","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}],"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 = '{"reservations":[{"affinity_policy":"automatic","capacity":{"allocated":10,"available":8,"status":"allocated","total":10,"used":2},"committed_use":{"expiration_at":"2019-01-01T12:00:00.000Z","expiration_policy":"release","term":"term"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63","href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-ba49df72-37b8-43ac-98da-f8e029de0e63","lifecycle_state":"stable","name":"my-reservation","profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"reservation","status":"activating","status_reasons":[{"code":"cannot_activate_no_capacity_available","message":"The reservation cannot be activated because capacity is unavailable","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}],"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, @@ -17306,6 +17167,8 @@ def test_list_reservations_with_pager_get_next(self): client=_service, limit=10, name='my-name', + profile_resource_type='testString', + affinity_policy='automatic', resource_group_id='testString', zone_name='us-south-1', ) @@ -17322,8 +17185,8 @@ def test_list_reservations_with_pager_get_all(self): """ # Set up a two-page mock response url = preprocess_url('/reservations') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"reservations":[{"affinity_policy":"restricted","capacity":{"allocated":10,"available":8,"status":"allocated","total":10,"used":2},"committed_use":{"expiration_at":"2019-01-01T12:00:00.000Z","expiration_policy":"release","term":"term"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63","href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-ba49df72-37b8-43ac-98da-f8e029de0e63","lifecycle_state":"stable","name":"my-reservation","profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"reservation","status":"activating","status_reasons":[{"code":"cannot_activate_no_capacity_available","message":"The reservation cannot be activated because capacity is unavailable","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}],"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 = '{"reservations":[{"affinity_policy":"restricted","capacity":{"allocated":10,"available":8,"status":"allocated","total":10,"used":2},"committed_use":{"expiration_at":"2019-01-01T12:00:00.000Z","expiration_policy":"release","term":"term"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63","href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-ba49df72-37b8-43ac-98da-f8e029de0e63","lifecycle_state":"stable","name":"my-reservation","profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"reservation","status":"activating","status_reasons":[{"code":"cannot_activate_no_capacity_available","message":"The reservation cannot be activated because capacity is unavailable","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}],"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"},"reservations":[{"affinity_policy":"automatic","capacity":{"allocated":10,"available":8,"status":"allocated","total":10,"used":2},"committed_use":{"expiration_at":"2019-01-01T12:00:00.000Z","expiration_policy":"release","term":"term"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63","href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-ba49df72-37b8-43ac-98da-f8e029de0e63","lifecycle_state":"stable","name":"my-reservation","profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"reservation","status":"activating","status_reasons":[{"code":"cannot_activate_no_capacity_available","message":"The reservation cannot be activated because capacity is unavailable","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}],"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 = '{"reservations":[{"affinity_policy":"automatic","capacity":{"allocated":10,"available":8,"status":"allocated","total":10,"used":2},"committed_use":{"expiration_at":"2019-01-01T12:00:00.000Z","expiration_policy":"release","term":"term"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63","href":"https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-ba49df72-37b8-43ac-98da-f8e029de0e63","lifecycle_state":"stable","name":"my-reservation","profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16","resource_type":"instance_profile"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"reservation","status":"activating","status_reasons":[{"code":"cannot_activate_no_capacity_available","message":"The reservation cannot be activated because capacity is unavailable","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}],"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, @@ -17344,6 +17207,8 @@ def test_list_reservations_with_pager_get_all(self): client=_service, limit=10, name='my-name', + profile_resource_type='testString', + affinity_policy='automatic', resource_group_id='testString', zone_name='us-south-1', ) @@ -17364,7 +17229,7 @@ def test_create_reservation_all_params(self): """ # Set up mock url = preprocess_url('/reservations') - mock_response = '{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 8, "status": "allocated", "total": 10, "used": 2}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"affinity_policy": "automatic", "capacity": {"allocated": 10, "available": 8, "status": "allocated", "total": 10, "used": 2}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "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, @@ -17385,7 +17250,7 @@ def test_create_reservation_all_params(self): # 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'] = 'bare_metal_server_profile' # Construct a dict representation of a ZoneIdentityByName model zone_identity_model = {} @@ -17400,7 +17265,7 @@ def test_create_reservation_all_params(self): committed_use = reservation_committed_use_prototype_model profile = reservation_profile_prototype_model zone = zone_identity_model - affinity_policy = 'restricted' + affinity_policy = 'automatic' name = 'my-reservation' resource_group = resource_group_identity_model @@ -17425,7 +17290,7 @@ def test_create_reservation_all_params(self): 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' + assert req_body['affinity_policy'] == 'automatic' assert req_body['name'] == 'my-reservation' assert req_body['resource_group'] == resource_group_identity_model @@ -17445,7 +17310,7 @@ def test_create_reservation_value_error(self): """ # Set up mock url = preprocess_url('/reservations') - mock_response = '{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 8, "status": "allocated", "total": 10, "used": 2}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"affinity_policy": "automatic", "capacity": {"allocated": 10, "available": 8, "status": "allocated", "total": 10, "used": 2}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "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, @@ -17466,7 +17331,7 @@ def test_create_reservation_value_error(self): # 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'] = 'bare_metal_server_profile' # Construct a dict representation of a ZoneIdentityByName model zone_identity_model = {} @@ -17481,7 +17346,7 @@ def test_create_reservation_value_error(self): committed_use = reservation_committed_use_prototype_model profile = reservation_profile_prototype_model zone = zone_identity_model - affinity_policy = 'restricted' + affinity_policy = 'automatic' name = 'my-reservation' resource_group = resource_group_identity_model @@ -17519,7 +17384,7 @@ def test_delete_reservation_all_params(self): """ # Set up mock url = preprocess_url('/reservations/testString') - mock_response = '{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 8, "status": "allocated", "total": 10, "used": 2}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"affinity_policy": "automatic", "capacity": {"allocated": 10, "available": 8, "status": "allocated", "total": 10, "used": 2}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "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, @@ -17557,7 +17422,7 @@ def test_delete_reservation_value_error(self): """ # Set up mock url = preprocess_url('/reservations/testString') - mock_response = '{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 8, "status": "allocated", "total": 10, "used": 2}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"affinity_policy": "automatic", "capacity": {"allocated": 10, "available": 8, "status": "allocated", "total": 10, "used": 2}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "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, @@ -17600,7 +17465,7 @@ def test_get_reservation_all_params(self): """ # Set up mock url = preprocess_url('/reservations/testString') - mock_response = '{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 8, "status": "allocated", "total": 10, "used": 2}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"affinity_policy": "automatic", "capacity": {"allocated": 10, "available": 8, "status": "allocated", "total": 10, "used": 2}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "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, @@ -17638,7 +17503,7 @@ def test_get_reservation_value_error(self): """ # Set up mock url = preprocess_url('/reservations/testString') - mock_response = '{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 8, "status": "allocated", "total": 10, "used": 2}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"affinity_policy": "automatic", "capacity": {"allocated": 10, "available": 8, "status": "allocated", "total": 10, "used": 2}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "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, @@ -17681,7 +17546,7 @@ def test_update_reservation_all_params(self): """ # Set up mock url = preprocess_url('/reservations/testString') - mock_response = '{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 8, "status": "allocated", "total": 10, "used": 2}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"affinity_policy": "automatic", "capacity": {"allocated": 10, "available": 8, "status": "allocated", "total": 10, "used": 2}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "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, @@ -17702,10 +17567,11 @@ def test_update_reservation_all_params(self): # Construct a dict representation of a ReservationProfilePatch model reservation_profile_patch_model = {} reservation_profile_patch_model['name'] = 'bx2-4x16' - reservation_profile_patch_model['resource_type'] = 'instance_profile' + reservation_profile_patch_model['resource_type'] = 'bare_metal_server_profile' # Construct a dict representation of a ReservationPatch model reservation_patch_model = {} + reservation_patch_model['affinity_policy'] = 'automatic' reservation_patch_model['capacity'] = reservation_capacity_patch_model reservation_patch_model['committed_use'] = reservation_committed_use_patch_model reservation_patch_model['name'] = 'my-reservation' @@ -17745,7 +17611,7 @@ def test_update_reservation_value_error(self): """ # Set up mock url = preprocess_url('/reservations/testString') - mock_response = '{"affinity_policy": "restricted", "capacity": {"allocated": 10, "available": 8, "status": "allocated", "total": 10, "used": 2}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}' + mock_response = '{"affinity_policy": "automatic", "capacity": {"allocated": 10, "available": 8, "status": "allocated", "total": 10, "used": 2}, "committed_use": {"expiration_at": "2019-01-01T12:00:00.000Z", "expiration_policy": "release", "term": "term"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "href": "https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "lifecycle_state": "stable", "name": "my-reservation", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16", "resource_type": "instance_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "reservation", "status": "activating", "status_reasons": [{"code": "cannot_activate_no_capacity_available", "message": "The reservation cannot be activated because capacity is unavailable", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-reserved-capacity-status-reasons"}], "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, @@ -17766,10 +17632,11 @@ def test_update_reservation_value_error(self): # Construct a dict representation of a ReservationProfilePatch model reservation_profile_patch_model = {} reservation_profile_patch_model['name'] = 'bx2-4x16' - reservation_profile_patch_model['resource_type'] = 'instance_profile' + reservation_profile_patch_model['resource_type'] = 'bare_metal_server_profile' # Construct a dict representation of a ReservationPatch model reservation_patch_model = {} + reservation_patch_model['affinity_policy'] = 'automatic' reservation_patch_model['capacity'] = reservation_capacity_patch_model reservation_patch_model['committed_use'] = reservation_committed_use_patch_model reservation_patch_model['name'] = 'my-reservation' @@ -18039,7 +17906,8 @@ 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()} with pytest.raises(ValueError): @@ -18599,7 +18467,8 @@ 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()} with pytest.raises(ValueError): @@ -18876,7 +18745,8 @@ 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()} with pytest.raises(ValueError): @@ -19769,7 +19639,8 @@ 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()} with pytest.raises(ValueError): @@ -20133,7 +20004,7 @@ def test_update_placement_group_all_params(self): # Construct a dict representation of a PlacementGroupPatch model placement_group_patch_model = {} - placement_group_patch_model['name'] = 'my-placement-group' + placement_group_patch_model['name'] = 'my-placement-group-updated' # Set up parameter values id = 'testString' @@ -20180,7 +20051,7 @@ def test_update_placement_group_value_error(self): # Construct a dict representation of a PlacementGroupPatch model placement_group_patch_model = {} - placement_group_patch_model['name'] = 'my-placement-group' + placement_group_patch_model['name'] = 'my-placement-group-updated' # Set up parameter values id = 'testString' @@ -20275,7 +20146,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": "href"}, "limit": 20, "next": {"href": "href"}, "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}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "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"]}, "reservation_terms": {"type": "enum", "values": ["one_year"]}, "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, @@ -20320,7 +20191,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": "href"}, "limit": 20, "next": {"href": "href"}, "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}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "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"]}, "reservation_terms": {"type": "enum", "values": ["one_year"]}, "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, @@ -20352,7 +20223,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": "href"}, "limit": 20, "next": {"href": "href"}, "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}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "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"]}, "reservation_terms": {"type": "enum", "values": ["one_year"]}, "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, @@ -20362,7 +20233,8 @@ 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()} with pytest.raises(ValueError): @@ -20384,8 +20256,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":{"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}}]}' + 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"]},"reservation_terms":{"type":"enum","values":["one_year"]},"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"]},"reservation_terms":{"type":"enum","values":["one_year"]},"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, @@ -20420,8 +20292,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":{"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}}]}' + 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"]},"reservation_terms":{"type":"enum","values":["one_year"]},"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"]},"reservation_terms":{"type":"enum","values":["one_year"]},"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, @@ -20459,7 +20331,7 @@ def test_get_bare_metal_server_profile_all_params(self): """ # Set up mock url = preprocess_url('/bare_metal_server/profiles/bx2-metal-192x768') - 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}}' + 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"]}, "reservation_terms": {"type": "enum", "values": ["one_year"]}, "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, @@ -20497,7 +20369,7 @@ def test_get_bare_metal_server_profile_value_error(self): """ # Set up mock url = preprocess_url('/bare_metal_server/profiles/bx2-metal-192x768') - 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}}' + 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"]}, "reservation_terms": {"type": "enum", "values": ["one_year"]}, "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, @@ -20540,7 +20412,7 @@ def test_list_bare_metal_servers_all_params(self): """ # Set up mock url = preprocess_url('/bare_metal_servers') - mock_response = '{"bare_metal_servers": [{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "firmware": {"update": "none"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "id": "0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "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": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "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.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "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"}}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"bare_metal_servers": [{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "firmware": {"update": "none"}, "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-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "id": "0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "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": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "automatic", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-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": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "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.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "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"}}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -20554,6 +20426,9 @@ def test_list_bare_metal_servers_all_params(self): limit = 50 resource_group_id = 'testString' name = 'my-name' + reservation_id = 'testString' + 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_name = 'my-vpc' @@ -20564,6 +20439,9 @@ def test_list_bare_metal_servers_all_params(self): limit=limit, resource_group_id=resource_group_id, name=name, + reservation_id=reservation_id, + reservation_crn=reservation_crn, + reservation_name=reservation_name, vpc_id=vpc_id, vpc_crn=vpc_crn, vpc_name=vpc_name, @@ -20580,6 +20458,9 @@ def test_list_bare_metal_servers_all_params(self): assert 'limit={}'.format(limit) in query_string assert 'resource_group.id={}'.format(resource_group_id) in query_string assert 'name={}'.format(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 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 @@ -20600,7 +20481,7 @@ def test_list_bare_metal_servers_required_params(self): """ # Set up mock url = preprocess_url('/bare_metal_servers') - mock_response = '{"bare_metal_servers": [{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "firmware": {"update": "none"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "id": "0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "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": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "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.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "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"}}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"bare_metal_servers": [{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "firmware": {"update": "none"}, "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-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "id": "0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "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": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "automatic", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-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": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "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.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "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"}}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -20632,7 +20513,7 @@ def test_list_bare_metal_servers_value_error(self): """ # Set up mock url = preprocess_url('/bare_metal_servers') - mock_response = '{"bare_metal_servers": [{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "firmware": {"update": "none"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "id": "0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "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": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "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.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "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"}}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"bare_metal_servers": [{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "firmware": {"update": "none"}, "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-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "id": "0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "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": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "automatic", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-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": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "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.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "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"}}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -20642,7 +20523,8 @@ 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()} with pytest.raises(ValueError): @@ -20664,8 +20546,8 @@ def test_list_bare_metal_servers_with_pager_get_next(self): """ # Set up a two-page mock response url = preprocess_url('/bare_metal_servers') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"bare_metal_servers":[{"bandwidth":20000,"boot_target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-bare-metal-server-disk","resource_type":"bare_metal_server_disk"},"cpu":{"architecture":"amd64","core_count":80,"socket_count":4,"threads_per_core":2},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304","disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","interface_type":"fcp","name":"my-bare-metal-server-disk","resource_type":"bare_metal_server_disk","size":100}],"enable_secure_boot":false,"firmware":{"update":"none"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304","id":"0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304","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":1536,"name":"my-bare-metal-server","network_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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":"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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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"}}],"primary_network_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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":"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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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/bare_metal_servers/profiles/bx2-metal-192x768","name":"bx2-metal-192x768","resource_type":"bare_metal_server_profile"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"bare_metal_server","status":"deleting","status_reasons":[{"code":"cannot_start_capacity","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.","more_info":"https://console.bluemix.net/docs/iaas/bare_metal_server.html"}],"trusted_platform_module":{"enabled":true,"mode":"disabled","supported_modes":["disabled"]},"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_response2 = '{"total_count":2,"limit":1,"bare_metal_servers":[{"bandwidth":20000,"boot_target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-bare-metal-server-disk","resource_type":"bare_metal_server_disk"},"cpu":{"architecture":"amd64","core_count":80,"socket_count":4,"threads_per_core":2},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304","disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","interface_type":"fcp","name":"my-bare-metal-server-disk","resource_type":"bare_metal_server_disk","size":100}],"enable_secure_boot":false,"firmware":{"update":"none"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304","id":"0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304","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":1536,"name":"my-bare-metal-server","network_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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":"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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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"}}],"primary_network_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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":"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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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/bare_metal_servers/profiles/bx2-metal-192x768","name":"bx2-metal-192x768","resource_type":"bare_metal_server_profile"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"bare_metal_server","status":"deleting","status_reasons":[{"code":"cannot_start_capacity","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.","more_info":"https://console.bluemix.net/docs/iaas/bare_metal_server.html"}],"trusted_platform_module":{"enabled":true,"mode":"disabled","supported_modes":["disabled"]},"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_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"bare_metal_servers":[{"bandwidth":20000,"boot_target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-bare-metal-server-disk","resource_type":"bare_metal_server_disk"},"cpu":{"architecture":"amd64","core_count":80,"socket_count":4,"threads_per_core":2},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304","disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","interface_type":"fcp","name":"my-bare-metal-server-disk","resource_type":"bare_metal_server_disk","size":100}],"enable_secure_boot":false,"firmware":{"update":"none"},"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-server-health-status-reasons"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304","id":"0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304","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":1536,"name":"my-bare-metal-server","network_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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":"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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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"}}],"primary_network_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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":"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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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/bare_metal_servers/profiles/bx2-metal-192x768","name":"bx2-metal-192x768","resource_type":"bare_metal_server_profile"},"reservation":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"},"reservation_affinity":{"policy":"automatic","pool":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-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":"bare_metal_server","status":"deleting","status_reasons":[{"code":"cannot_start_capacity","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.","more_info":"https://console.bluemix.net/docs/iaas/bare_metal_server.html"}],"trusted_platform_module":{"enabled":true,"mode":"disabled","supported_modes":["disabled"]},"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_response2 = '{"total_count":2,"limit":1,"bare_metal_servers":[{"bandwidth":20000,"boot_target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-bare-metal-server-disk","resource_type":"bare_metal_server_disk"},"cpu":{"architecture":"amd64","core_count":80,"socket_count":4,"threads_per_core":2},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304","disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","interface_type":"fcp","name":"my-bare-metal-server-disk","resource_type":"bare_metal_server_disk","size":100}],"enable_secure_boot":false,"firmware":{"update":"none"},"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-server-health-status-reasons"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304","id":"0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304","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":1536,"name":"my-bare-metal-server","network_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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":"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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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"}}],"primary_network_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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":"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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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/bare_metal_servers/profiles/bx2-metal-192x768","name":"bx2-metal-192x768","resource_type":"bare_metal_server_profile"},"reservation":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"},"reservation_affinity":{"policy":"automatic","pool":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-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":"bare_metal_server","status":"deleting","status_reasons":[{"code":"cannot_start_capacity","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.","more_info":"https://console.bluemix.net/docs/iaas/bare_metal_server.html"}],"trusted_platform_module":{"enabled":true,"mode":"disabled","supported_modes":["disabled"]},"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, @@ -20688,6 +20570,9 @@ def test_list_bare_metal_servers_with_pager_get_next(self): limit=10, resource_group_id='testString', name='my-name', + reservation_id='testString', + 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_name='my-vpc', @@ -20705,8 +20590,8 @@ def test_list_bare_metal_servers_with_pager_get_all(self): """ # Set up a two-page mock response url = preprocess_url('/bare_metal_servers') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"bare_metal_servers":[{"bandwidth":20000,"boot_target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-bare-metal-server-disk","resource_type":"bare_metal_server_disk"},"cpu":{"architecture":"amd64","core_count":80,"socket_count":4,"threads_per_core":2},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304","disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","interface_type":"fcp","name":"my-bare-metal-server-disk","resource_type":"bare_metal_server_disk","size":100}],"enable_secure_boot":false,"firmware":{"update":"none"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304","id":"0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304","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":1536,"name":"my-bare-metal-server","network_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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":"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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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"}}],"primary_network_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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":"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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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/bare_metal_servers/profiles/bx2-metal-192x768","name":"bx2-metal-192x768","resource_type":"bare_metal_server_profile"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"bare_metal_server","status":"deleting","status_reasons":[{"code":"cannot_start_capacity","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.","more_info":"https://console.bluemix.net/docs/iaas/bare_metal_server.html"}],"trusted_platform_module":{"enabled":true,"mode":"disabled","supported_modes":["disabled"]},"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_response2 = '{"total_count":2,"limit":1,"bare_metal_servers":[{"bandwidth":20000,"boot_target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-bare-metal-server-disk","resource_type":"bare_metal_server_disk"},"cpu":{"architecture":"amd64","core_count":80,"socket_count":4,"threads_per_core":2},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304","disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","interface_type":"fcp","name":"my-bare-metal-server-disk","resource_type":"bare_metal_server_disk","size":100}],"enable_secure_boot":false,"firmware":{"update":"none"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304","id":"0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304","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":1536,"name":"my-bare-metal-server","network_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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":"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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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"}}],"primary_network_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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":"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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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/bare_metal_servers/profiles/bx2-metal-192x768","name":"bx2-metal-192x768","resource_type":"bare_metal_server_profile"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"bare_metal_server","status":"deleting","status_reasons":[{"code":"cannot_start_capacity","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.","more_info":"https://console.bluemix.net/docs/iaas/bare_metal_server.html"}],"trusted_platform_module":{"enabled":true,"mode":"disabled","supported_modes":["disabled"]},"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_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"bare_metal_servers":[{"bandwidth":20000,"boot_target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-bare-metal-server-disk","resource_type":"bare_metal_server_disk"},"cpu":{"architecture":"amd64","core_count":80,"socket_count":4,"threads_per_core":2},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304","disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","interface_type":"fcp","name":"my-bare-metal-server-disk","resource_type":"bare_metal_server_disk","size":100}],"enable_secure_boot":false,"firmware":{"update":"none"},"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-server-health-status-reasons"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304","id":"0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304","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":1536,"name":"my-bare-metal-server","network_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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":"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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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"}}],"primary_network_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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":"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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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/bare_metal_servers/profiles/bx2-metal-192x768","name":"bx2-metal-192x768","resource_type":"bare_metal_server_profile"},"reservation":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"},"reservation_affinity":{"policy":"automatic","pool":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-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":"bare_metal_server","status":"deleting","status_reasons":[{"code":"cannot_start_capacity","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.","more_info":"https://console.bluemix.net/docs/iaas/bare_metal_server.html"}],"trusted_platform_module":{"enabled":true,"mode":"disabled","supported_modes":["disabled"]},"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_response2 = '{"total_count":2,"limit":1,"bare_metal_servers":[{"bandwidth":20000,"boot_target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-bare-metal-server-disk","resource_type":"bare_metal_server_disk"},"cpu":{"architecture":"amd64","core_count":80,"socket_count":4,"threads_per_core":2},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304","disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","interface_type":"fcp","name":"my-bare-metal-server-disk","resource_type":"bare_metal_server_disk","size":100}],"enable_secure_boot":false,"firmware":{"update":"none"},"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-server-health-status-reasons"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304","id":"0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304","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":1536,"name":"my-bare-metal-server","network_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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":"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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}}],"network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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"}}],"primary_network_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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":"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"},"virtual_network_interface":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","href":"https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","id":"0717-54eb57ee-86f2-4796-90bb-d7874e0831ef","name":"my-virtual-network-interface","resource_type":"virtual_network_interface"}},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","id":"0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6","name":"my-bare-metal-server-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/bare_metal_servers/profiles/bx2-metal-192x768","name":"bx2-metal-192x768","resource_type":"bare_metal_server_profile"},"reservation":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-ba49df72-37b8-43ac-98da-f8e029de0e63","name":"my-reservation","resource_type":"reservation"},"reservation_affinity":{"policy":"automatic","pool":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63","id":"0717-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":"bare_metal_server","status":"deleting","status_reasons":[{"code":"cannot_start_capacity","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.","more_info":"https://console.bluemix.net/docs/iaas/bare_metal_server.html"}],"trusted_platform_module":{"enabled":true,"mode":"disabled","supported_modes":["disabled"]},"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, @@ -20728,6 +20613,9 @@ def test_list_bare_metal_servers_with_pager_get_all(self): limit=10, resource_group_id='testString', name='my-name', + reservation_id='testString', + 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_name='my-vpc', @@ -20749,7 +20637,7 @@ def test_create_bare_metal_server_all_params(self): """ # Set up mock url = preprocess_url('/bare_metal_servers') - mock_response = '{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "firmware": {"update": "none"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "id": "0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "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": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "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.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "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 = '{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "firmware": {"update": "none"}, "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-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "id": "0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "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": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "automatic", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-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": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "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.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "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, @@ -20776,6 +20664,15 @@ def test_create_bare_metal_server_all_params(self): bare_metal_server_profile_identity_model = {} bare_metal_server_profile_identity_model['name'] = 'bx2-metal-192x768' + # Construct a dict representation of a ReservationIdentityById model + reservation_identity_model = {} + reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' + + # Construct a dict representation of a BareMetalServerReservationAffinityPrototype model + bare_metal_server_reservation_affinity_prototype_model = {} + bare_metal_server_reservation_affinity_prototype_model['policy'] = 'automatic' + bare_metal_server_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' @@ -20816,44 +20713,26 @@ def test_create_bare_metal_server_all_params(self): 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[ - '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['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['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['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' @@ -20864,18 +20743,13 @@ def test_create_bare_metal_server_all_params(self): 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['reservation_affinity'] = bare_metal_server_reservation_affinity_prototype_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['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 @@ -20909,7 +20783,7 @@ def test_create_bare_metal_server_value_error(self): """ # Set up mock url = preprocess_url('/bare_metal_servers') - mock_response = '{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "firmware": {"update": "none"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "id": "0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "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": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "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.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "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 = '{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "firmware": {"update": "none"}, "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-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "id": "0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "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": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "automatic", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-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": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "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.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "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, @@ -20936,6 +20810,15 @@ def test_create_bare_metal_server_value_error(self): bare_metal_server_profile_identity_model = {} bare_metal_server_profile_identity_model['name'] = 'bx2-metal-192x768' + # Construct a dict representation of a ReservationIdentityById model + reservation_identity_model = {} + reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' + + # Construct a dict representation of a BareMetalServerReservationAffinityPrototype model + bare_metal_server_reservation_affinity_prototype_model = {} + bare_metal_server_reservation_affinity_prototype_model['policy'] = 'automatic' + bare_metal_server_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' @@ -20976,44 +20859,26 @@ def test_create_bare_metal_server_value_error(self): 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[ - '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['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['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['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' @@ -21024,18 +20889,13 @@ def test_create_bare_metal_server_value_error(self): 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['reservation_affinity'] = bare_metal_server_reservation_affinity_prototype_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['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 @@ -21665,35 +21525,19 @@ def test_create_bare_metal_server_network_attachment_all_params(self): 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[ - '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['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['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' @@ -21768,35 +21612,19 @@ def test_create_bare_metal_server_network_attachment_value_error(self): 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[ - '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['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['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' @@ -23053,7 +22881,7 @@ def test_list_bare_metal_server_network_interface_ips_all_params(self): """ # Set up mock url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString/ips') - mock_response = '{"first": {"href": "href"}, "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": "provider", "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": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "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": "provider", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -23093,7 +22921,7 @@ def test_list_bare_metal_server_network_interface_ips_value_error(self): """ # Set up mock url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString/ips') - mock_response = '{"first": {"href": "href"}, "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": "provider", "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": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "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": "provider", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -23138,7 +22966,7 @@ def test_get_bare_metal_server_network_interface_ip_all_params(self): """ # Set up mock 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": "provider", "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_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": "provider", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}' responses.add( responses.GET, url, @@ -23180,7 +23008,7 @@ def test_get_bare_metal_server_network_interface_ip_value_error(self): """ # Set up mock 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": "provider", "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_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": "provider", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}' responses.add( responses.GET, url, @@ -23302,7 +23130,7 @@ def test_get_bare_metal_server_all_params(self): """ # Set up mock url = preprocess_url('/bare_metal_servers/testString') - mock_response = '{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "firmware": {"update": "none"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "id": "0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "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": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "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.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "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 = '{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "firmware": {"update": "none"}, "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-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "id": "0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "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": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "automatic", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-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": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "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.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "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, @@ -23340,7 +23168,7 @@ def test_get_bare_metal_server_value_error(self): """ # Set up mock url = preprocess_url('/bare_metal_servers/testString') - mock_response = '{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "firmware": {"update": "none"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "id": "0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "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": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "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.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "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 = '{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "firmware": {"update": "none"}, "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-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "id": "0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "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": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "automatic", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-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": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "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.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "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, @@ -23383,7 +23211,7 @@ def test_update_bare_metal_server_all_params(self): """ # Set up mock url = preprocess_url('/bare_metal_servers/testString') - mock_response = '{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "firmware": {"update": "none"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "id": "0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "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": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "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.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "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 = '{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "firmware": {"update": "none"}, "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-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "id": "0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "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": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "automatic", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-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": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "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.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "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, @@ -23392,6 +23220,15 @@ def test_update_bare_metal_server_all_params(self): status=200, ) + # Construct a dict representation of a ReservationIdentityById model + reservation_identity_model = {} + reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' + + # Construct a dict representation of a BareMetalServerReservationAffinityPatch model + bare_metal_server_reservation_affinity_patch_model = {} + bare_metal_server_reservation_affinity_patch_model['policy'] = 'automatic' + bare_metal_server_reservation_affinity_patch_model['pool'] = [reservation_identity_model] + # 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' @@ -23401,6 +23238,7 @@ def test_update_bare_metal_server_all_params(self): 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['reservation_affinity'] = bare_metal_server_reservation_affinity_patch_model bare_metal_server_patch_model['trusted_platform_module'] = bare_metal_server_trusted_platform_module_patch_model # Set up parameter values @@ -23437,7 +23275,7 @@ def test_update_bare_metal_server_value_error(self): """ # Set up mock url = preprocess_url('/bare_metal_servers/testString') - mock_response = '{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "firmware": {"update": "none"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "id": "0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "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": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "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.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "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 = '{"bandwidth": 20000, "boot_target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk"}, "cpu": {"architecture": "amd64", "core_count": 80, "socket_count": 4, "threads_per_core": 2}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}], "enable_secure_boot": false, "firmware": {"update": "none"}, "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-server-health-status-reasons"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "id": "0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304", "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": 1536, "name": "my-bare-metal-server", "network_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}], "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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"}}], "primary_network_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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": "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"}, "virtual_network_interface": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "href": "https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "id": "0717-54eb57ee-86f2-4796-90bb-d7874e0831ef", "name": "my-virtual-network-interface", "resource_type": "virtual_network_interface"}}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "id": "0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6", "name": "my-bare-metal-server-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/bare_metal_servers/profiles/bx2-metal-192x768", "name": "bx2-metal-192x768", "resource_type": "bare_metal_server_profile"}, "reservation": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "name": "my-reservation", "resource_type": "reservation"}, "reservation_affinity": {"policy": "automatic", "pool": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63", "id": "0717-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": "bare_metal_server", "status": "deleting", "status_reasons": [{"code": "cannot_start_capacity", "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.", "more_info": "https://console.bluemix.net/docs/iaas/bare_metal_server.html"}], "trusted_platform_module": {"enabled": true, "mode": "disabled", "supported_modes": ["disabled"]}, "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, @@ -23446,6 +23284,15 @@ def test_update_bare_metal_server_value_error(self): status=200, ) + # Construct a dict representation of a ReservationIdentityById model + reservation_identity_model = {} + reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' + + # Construct a dict representation of a BareMetalServerReservationAffinityPatch model + bare_metal_server_reservation_affinity_patch_model = {} + bare_metal_server_reservation_affinity_patch_model['policy'] = 'automatic' + bare_metal_server_reservation_affinity_patch_model['pool'] = [reservation_identity_model] + # 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' @@ -23455,6 +23302,7 @@ def test_update_bare_metal_server_value_error(self): 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['reservation_affinity'] = bare_metal_server_reservation_affinity_patch_model bare_metal_server_patch_model['trusted_platform_module'] = bare_metal_server_trusted_platform_module_patch_model # Set up parameter values @@ -24178,7 +24026,8 @@ 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()} with pytest.raises(ValueError): @@ -24356,7 +24205,7 @@ def test_list_volumes_all_params(self): """ # Set up mock url = preprocess_url('/volumes') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132, "volumes": [{"active": true, "adjustable_capacity_states": ["attached"], "adjustable_iops_states": ["attached"], "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-24-04-amd64", "name": "ubuntu-24-04-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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132, "volumes": [{"active": true, "adjustable_capacity_states": ["attached"], "adjustable_iops_states": ["attached"], "attachment_state": "attached", "bandwidth": 100, "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-24-04-amd64", "name": "ubuntu-24-04-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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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, @@ -24422,7 +24271,7 @@ def test_list_volumes_required_params(self): """ # Set up mock url = preprocess_url('/volumes') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132, "volumes": [{"active": true, "adjustable_capacity_states": ["attached"], "adjustable_iops_states": ["attached"], "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-24-04-amd64", "name": "ubuntu-24-04-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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132, "volumes": [{"active": true, "adjustable_capacity_states": ["attached"], "adjustable_iops_states": ["attached"], "attachment_state": "attached", "bandwidth": 100, "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-24-04-amd64", "name": "ubuntu-24-04-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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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, @@ -24454,7 +24303,7 @@ def test_list_volumes_value_error(self): """ # Set up mock url = preprocess_url('/volumes') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132, "volumes": [{"active": true, "adjustable_capacity_states": ["attached"], "adjustable_iops_states": ["attached"], "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-24-04-amd64", "name": "ubuntu-24-04-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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132, "volumes": [{"active": true, "adjustable_capacity_states": ["attached"], "adjustable_iops_states": ["attached"], "attachment_state": "attached", "bandwidth": 100, "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-24-04-amd64", "name": "ubuntu-24-04-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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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, @@ -24464,7 +24313,8 @@ 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()} with pytest.raises(ValueError): @@ -24486,8 +24336,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,"adjustable_capacity_states":["attached"],"adjustable_iops_states":["attached"],"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-24-04-amd64","name":"ubuntu-24-04-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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"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":"id"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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_e21b7391-2ca2-4ab5-84a8-b92157a633b0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","id":"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","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,"adjustable_capacity_states":["attached"],"adjustable_iops_states":["attached"],"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-24-04-amd64","name":"ubuntu-24-04-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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"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":"id"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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_e21b7391-2ca2-4ab5-84a8-b92157a633b0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","id":"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","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,"adjustable_capacity_states":["attached"],"adjustable_iops_states":["attached"],"attachment_state":"attached","bandwidth":100,"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-24-04-amd64","name":"ubuntu-24-04-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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"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":"id"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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_e21b7391-2ca2-4ab5-84a8-b92157a633b0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","id":"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","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,"adjustable_capacity_states":["attached"],"adjustable_iops_states":["attached"],"attachment_state":"attached","bandwidth":100,"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-24-04-amd64","name":"ubuntu-24-04-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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"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":"id"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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_e21b7391-2ca2-4ab5-84a8-b92157a633b0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","id":"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","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, @@ -24529,8 +24379,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,"adjustable_capacity_states":["attached"],"adjustable_iops_states":["attached"],"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-24-04-amd64","name":"ubuntu-24-04-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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"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":"id"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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_e21b7391-2ca2-4ab5-84a8-b92157a633b0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","id":"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","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,"adjustable_capacity_states":["attached"],"adjustable_iops_states":["attached"],"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-24-04-amd64","name":"ubuntu-24-04-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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"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":"id"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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_e21b7391-2ca2-4ab5-84a8-b92157a633b0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","id":"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","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,"adjustable_capacity_states":["attached"],"adjustable_iops_states":["attached"],"attachment_state":"attached","bandwidth":100,"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-24-04-amd64","name":"ubuntu-24-04-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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"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":"id"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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_e21b7391-2ca2-4ab5-84a8-b92157a633b0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","id":"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","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,"adjustable_capacity_states":["attached"],"adjustable_iops_states":["attached"],"attachment_state":"attached","bandwidth":100,"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-24-04-amd64","name":"ubuntu-24-04-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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"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":"id"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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_e21b7391-2ca2-4ab5-84a8-b92157a633b0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","id":"0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0","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, @@ -24575,7 +24425,7 @@ def test_create_volume_all_params(self): """ # Set up mock url = preprocess_url('/volumes') - mock_response = '{"active": true, "adjustable_capacity_states": ["attached"], "adjustable_iops_states": ["attached"], "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-24-04-amd64", "name": "ubuntu-24-04-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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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, "adjustable_capacity_states": ["attached"], "adjustable_iops_states": ["attached"], "attachment_state": "attached", "bandwidth": 100, "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-24-04-amd64", "name": "ubuntu-24-04-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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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, @@ -24598,9 +24448,7 @@ 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 = {} @@ -24645,7 +24493,7 @@ def test_create_volume_value_error(self): """ # Set up mock url = preprocess_url('/volumes') - mock_response = '{"active": true, "adjustable_capacity_states": ["attached"], "adjustable_iops_states": ["attached"], "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-24-04-amd64", "name": "ubuntu-24-04-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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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, "adjustable_capacity_states": ["attached"], "adjustable_iops_states": ["attached"], "attachment_state": "attached", "bandwidth": 100, "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-24-04-amd64", "name": "ubuntu-24-04-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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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, @@ -24668,9 +24516,7 @@ 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 = {} @@ -24829,7 +24675,7 @@ def test_get_volume_all_params(self): """ # Set up mock url = preprocess_url('/volumes/testString') - mock_response = '{"active": true, "adjustable_capacity_states": ["attached"], "adjustable_iops_states": ["attached"], "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-24-04-amd64", "name": "ubuntu-24-04-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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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, "adjustable_capacity_states": ["attached"], "adjustable_iops_states": ["attached"], "attachment_state": "attached", "bandwidth": 100, "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-24-04-amd64", "name": "ubuntu-24-04-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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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, @@ -24867,7 +24713,7 @@ def test_get_volume_value_error(self): """ # Set up mock url = preprocess_url('/volumes/testString') - mock_response = '{"active": true, "adjustable_capacity_states": ["attached"], "adjustable_iops_states": ["attached"], "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-24-04-amd64", "name": "ubuntu-24-04-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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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, "adjustable_capacity_states": ["attached"], "adjustable_iops_states": ["attached"], "attachment_state": "attached", "bandwidth": 100, "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-24-04-amd64", "name": "ubuntu-24-04-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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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, @@ -24910,7 +24756,7 @@ def test_update_volume_all_params(self): """ # Set up mock url = preprocess_url('/volumes/testString') - mock_response = '{"active": true, "adjustable_capacity_states": ["attached"], "adjustable_iops_states": ["attached"], "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-24-04-amd64", "name": "ubuntu-24-04-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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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, "adjustable_capacity_states": ["attached"], "adjustable_iops_states": ["attached"], "attachment_state": "attached", "bandwidth": 100, "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-24-04-amd64", "name": "ubuntu-24-04-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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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, @@ -24967,7 +24813,7 @@ def test_update_volume_required_params(self): """ # Set up mock url = preprocess_url('/volumes/testString') - mock_response = '{"active": true, "adjustable_capacity_states": ["attached"], "adjustable_iops_states": ["attached"], "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-24-04-amd64", "name": "ubuntu-24-04-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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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, "adjustable_capacity_states": ["attached"], "adjustable_iops_states": ["attached"], "attachment_state": "attached", "bandwidth": 100, "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-24-04-amd64", "name": "ubuntu-24-04-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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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, @@ -25022,7 +24868,7 @@ def test_update_volume_value_error(self): """ # Set up mock url = preprocess_url('/volumes/testString') - mock_response = '{"active": true, "adjustable_capacity_states": ["attached"], "adjustable_iops_states": ["attached"], "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-24-04-amd64", "name": "ubuntu-24-04-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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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, "adjustable_capacity_states": ["attached"], "adjustable_iops_states": ["attached"], "attachment_state": "attached", "bandwidth": 100, "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-24-04-amd64", "name": "ubuntu-24-04-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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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": "id"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "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, @@ -25136,7 +24982,7 @@ def test_list_snapshot_consistency_groups_all_params(self): """ # Set up mock url = preprocess_url('/snapshot_consistency_groups') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "snapshot_consistency_groups": [{"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"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": true, "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", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["service_tags"], "snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}], "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "snapshot_consistency_groups": [{"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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": true, "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", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["service_tags"], "snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}], "total_count": 132}' responses.add( responses.GET, url, @@ -25193,7 +25039,7 @@ def test_list_snapshot_consistency_groups_required_params(self): """ # Set up mock url = preprocess_url('/snapshot_consistency_groups') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "snapshot_consistency_groups": [{"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"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": true, "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", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["service_tags"], "snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}], "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "snapshot_consistency_groups": [{"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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": true, "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", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["service_tags"], "snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}], "total_count": 132}' responses.add( responses.GET, url, @@ -25225,7 +25071,7 @@ def test_list_snapshot_consistency_groups_value_error(self): """ # Set up mock url = preprocess_url('/snapshot_consistency_groups') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "snapshot_consistency_groups": [{"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"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": true, "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", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["service_tags"], "snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}], "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "snapshot_consistency_groups": [{"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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": true, "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", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["service_tags"], "snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}], "total_count": 132}' responses.add( responses.GET, url, @@ -25235,7 +25081,8 @@ 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()} with pytest.raises(ValueError): @@ -25257,8 +25104,8 @@ def test_list_snapshot_consistency_groups_with_pager_get_next(self): """ # Set up a two-page mock response url = preprocess_url('/snapshot_consistency_groups') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"snapshot_consistency_groups":[{"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"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263","delete_snapshots_on_delete":true,"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","lifecycle_state":"stable","name":"my-snapshot-consistency-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"snapshot_consistency_group","service_tags":["service_tags"],"snapshots":[{"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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}]}],"total_count":2,"limit":1}' - mock_response2 = '{"snapshot_consistency_groups":[{"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"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263","delete_snapshots_on_delete":true,"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","lifecycle_state":"stable","name":"my-snapshot-consistency-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"snapshot_consistency_group","service_tags":["service_tags"],"snapshots":[{"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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}]}],"total_count":2,"limit":1}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"snapshot_consistency_groups":[{"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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r006-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"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263","delete_snapshots_on_delete":true,"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","lifecycle_state":"stable","name":"my-snapshot-consistency-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"snapshot_consistency_group","service_tags":["service_tags"],"snapshots":[{"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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}]}],"total_count":2,"limit":1}' + mock_response2 = '{"snapshot_consistency_groups":[{"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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r006-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"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263","delete_snapshots_on_delete":true,"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","lifecycle_state":"stable","name":"my-snapshot-consistency-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"snapshot_consistency_group","service_tags":["service_tags"],"snapshots":[{"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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}]}],"total_count":2,"limit":1}' responses.add( responses.GET, url, @@ -25297,8 +25144,8 @@ def test_list_snapshot_consistency_groups_with_pager_get_all(self): """ # Set up a two-page mock response url = preprocess_url('/snapshot_consistency_groups') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"snapshot_consistency_groups":[{"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"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263","delete_snapshots_on_delete":true,"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","lifecycle_state":"stable","name":"my-snapshot-consistency-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"snapshot_consistency_group","service_tags":["service_tags"],"snapshots":[{"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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}]}],"total_count":2,"limit":1}' - mock_response2 = '{"snapshot_consistency_groups":[{"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"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263","delete_snapshots_on_delete":true,"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","lifecycle_state":"stable","name":"my-snapshot-consistency-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"snapshot_consistency_group","service_tags":["service_tags"],"snapshots":[{"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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}]}],"total_count":2,"limit":1}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"snapshot_consistency_groups":[{"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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r006-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"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263","delete_snapshots_on_delete":true,"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","lifecycle_state":"stable","name":"my-snapshot-consistency-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"snapshot_consistency_group","service_tags":["service_tags"],"snapshots":[{"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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}]}],"total_count":2,"limit":1}' + mock_response2 = '{"snapshot_consistency_groups":[{"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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r006-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"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263","delete_snapshots_on_delete":true,"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","lifecycle_state":"stable","name":"my-snapshot-consistency-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"snapshot_consistency_group","service_tags":["service_tags"],"snapshots":[{"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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}]}],"total_count":2,"limit":1}' responses.add( responses.GET, url, @@ -25340,7 +25187,7 @@ def test_create_snapshot_consistency_group_all_params(self): """ # Set up mock url = preprocess_url('/snapshot_consistency_groups') - 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"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": true, "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", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["service_tags"], "snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}' + 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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": true, "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", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["service_tags"], "snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}' responses.add( responses.POST, url, @@ -25368,9 +25215,7 @@ def test_create_snapshot_consistency_group_all_params(self): 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['snapshots'] = [snapshot_prototype_snapshot_consistency_group_context_model] # Set up parameter values snapshot_consistency_group_prototype = snapshot_consistency_group_prototype_model @@ -25404,7 +25249,7 @@ def test_create_snapshot_consistency_group_value_error(self): """ # Set up mock url = preprocess_url('/snapshot_consistency_groups') - 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"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": true, "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", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["service_tags"], "snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}' + 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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": true, "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", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["service_tags"], "snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}' responses.add( responses.POST, url, @@ -25432,9 +25277,7 @@ def test_create_snapshot_consistency_group_value_error(self): 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['snapshots'] = [snapshot_prototype_snapshot_consistency_group_context_model] # Set up parameter values snapshot_consistency_group_prototype = snapshot_consistency_group_prototype_model @@ -25470,7 +25313,7 @@ def test_delete_snapshot_consistency_group_all_params(self): """ # Set up mock url = preprocess_url('/snapshot_consistency_groups/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"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": true, "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", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["service_tags"], "snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}' + 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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": true, "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", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["service_tags"], "snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}' responses.add( responses.DELETE, url, @@ -25508,7 +25351,7 @@ def test_delete_snapshot_consistency_group_value_error(self): """ # Set up mock url = preprocess_url('/snapshot_consistency_groups/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"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": true, "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", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["service_tags"], "snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}' + 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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": true, "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", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["service_tags"], "snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}' responses.add( responses.DELETE, url, @@ -25551,7 +25394,7 @@ def test_get_snapshot_consistency_group_all_params(self): """ # Set up mock url = preprocess_url('/snapshot_consistency_groups/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"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": true, "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", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["service_tags"], "snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}' + 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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": true, "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", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["service_tags"], "snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}' responses.add( responses.GET, url, @@ -25589,7 +25432,7 @@ def test_get_snapshot_consistency_group_value_error(self): """ # Set up mock url = preprocess_url('/snapshot_consistency_groups/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"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": true, "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", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["service_tags"], "snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}' + 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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": true, "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", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["service_tags"], "snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}' responses.add( responses.GET, url, @@ -25632,7 +25475,7 @@ def test_update_snapshot_consistency_group_all_params(self): """ # Set up mock url = preprocess_url('/snapshot_consistency_groups/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"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": true, "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", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["service_tags"], "snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}' + 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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": true, "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", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["service_tags"], "snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}' responses.add( responses.PATCH, url, @@ -25682,7 +25525,7 @@ def test_update_snapshot_consistency_group_required_params(self): """ # Set up mock url = preprocess_url('/snapshot_consistency_groups/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"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": true, "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", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["service_tags"], "snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}' + 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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": true, "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", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["service_tags"], "snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}' responses.add( responses.PATCH, url, @@ -25730,7 +25573,7 @@ def test_update_snapshot_consistency_group_value_error(self): """ # Set up mock url = preprocess_url('/snapshot_consistency_groups/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"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": true, "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", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["service_tags"], "snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}' + 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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot-consistency-group:r134-fa329f6b-0e36-433f-a3bb-0df632e79263", "delete_snapshots_on_delete": true, "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", "lifecycle_state": "stable", "name": "my-snapshot-consistency-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot_consistency_group", "service_tags": ["service_tags"], "snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}' responses.add( responses.PATCH, url, @@ -25859,7 +25702,7 @@ def test_list_snapshots_all_params(self): """ # Set up mock url = preprocess_url('/snapshots') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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-24-04-amd64", "name": "ubuntu-24-04-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "progress": 55, "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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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": "href"}, "limit": 20, "next": {"href": "href"}, "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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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-24-04-amd64", "name": "ubuntu-24-04-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "progress": 55, "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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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, @@ -25964,7 +25807,7 @@ def test_list_snapshots_required_params(self): """ # Set up mock url = preprocess_url('/snapshots') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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-24-04-amd64", "name": "ubuntu-24-04-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "progress": 55, "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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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": "href"}, "limit": 20, "next": {"href": "href"}, "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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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-24-04-amd64", "name": "ubuntu-24-04-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "progress": 55, "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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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, @@ -25996,7 +25839,7 @@ def test_list_snapshots_value_error(self): """ # Set up mock url = preprocess_url('/snapshots') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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-24-04-amd64", "name": "ubuntu-24-04-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "progress": 55, "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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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": "href"}, "limit": 20, "next": {"href": "href"}, "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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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-24-04-amd64", "name": "ubuntu-24-04-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "progress": 55, "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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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, @@ -26006,7 +25849,8 @@ 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()} with pytest.raises(ValueError): @@ -26028,8 +25872,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","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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"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-24-04-amd64","name":"ubuntu-24-04-amd64","user_data_format":"cloud_init","vendor":"Canonical","version":"16.04 LTS"},"progress":55,"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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"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-24-04-amd64","name":"ubuntu-24-04-amd64","user_data_format":"cloud_init","vendor":"Canonical","version":"16.04 LTS"},"progress":55,"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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r006-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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"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-24-04-amd64","name":"ubuntu-24-04-amd64","user_data_format":"cloud_init","vendor":"Canonical","version":"16.04 LTS"},"progress":55,"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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r006-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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"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-24-04-amd64","name":"ubuntu-24-04-amd64","user_data_format":"cloud_init","vendor":"Canonical","version":"16.04 LTS"},"progress":55,"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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"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, @@ -26084,8 +25928,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","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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"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-24-04-amd64","name":"ubuntu-24-04-amd64","user_data_format":"cloud_init","vendor":"Canonical","version":"16.04 LTS"},"progress":55,"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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"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-24-04-amd64","name":"ubuntu-24-04-amd64","user_data_format":"cloud_init","vendor":"Canonical","version":"16.04 LTS"},"progress":55,"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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r006-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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"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-24-04-amd64","name":"ubuntu-24-04-amd64","user_data_format":"cloud_init","vendor":"Canonical","version":"16.04 LTS"},"progress":55,"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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r006-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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"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-24-04-amd64","name":"ubuntu-24-04-amd64","user_data_format":"cloud_init","vendor":"Canonical","version":"16.04 LTS"},"progress":55,"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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"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, @@ -26143,7 +25987,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", "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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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-24-04-amd64", "name": "ubuntu-24-04-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "progress": 55, "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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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-24-04-amd64", "name": "ubuntu-24-04-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "progress": 55, "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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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, @@ -26208,7 +26052,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", "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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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-24-04-amd64", "name": "ubuntu-24-04-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "progress": 55, "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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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-24-04-amd64", "name": "ubuntu-24-04-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "progress": 55, "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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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, @@ -26387,7 +26231,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", "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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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-24-04-amd64", "name": "ubuntu-24-04-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "progress": 55, "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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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-24-04-amd64", "name": "ubuntu-24-04-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "progress": 55, "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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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, @@ -26425,7 +26269,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", "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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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-24-04-amd64", "name": "ubuntu-24-04-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "progress": 55, "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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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-24-04-amd64", "name": "ubuntu-24-04-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "progress": 55, "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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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, @@ -26468,7 +26312,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", "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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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-24-04-amd64", "name": "ubuntu-24-04-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "progress": 55, "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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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-24-04-amd64", "name": "ubuntu-24-04-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "progress": 55, "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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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, @@ -26518,7 +26362,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", "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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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-24-04-amd64", "name": "ubuntu-24-04-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "progress": 55, "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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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-24-04-amd64", "name": "ubuntu-24-04-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "progress": 55, "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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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, @@ -26566,7 +26410,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", "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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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-24-04-amd64", "name": "ubuntu-24-04-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "progress": 55, "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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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-24-04-amd64", "name": "ubuntu-24-04-amd64", "user_data_format": "cloud_init", "vendor": "Canonical", "version": "16.04 LTS"}, "progress": 55, "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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "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, @@ -27093,7 +26937,8 @@ 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()} with pytest.raises(ValueError): @@ -27273,7 +27118,7 @@ def test_list_shares_all_params(self): """ # Set up mock url = preprocess_url('/shares') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "shares": [{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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:r006-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/r006-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}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "shares": [{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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, "snapshot_count": 0, "snapshot_size": 0, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-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/r006-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"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "id": "r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "name": "my-share-snapshot", "resource_type": "share_snapshot"}, "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, @@ -27330,7 +27175,7 @@ def test_list_shares_required_params(self): """ # Set up mock url = preprocess_url('/shares') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "shares": [{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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:r006-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/r006-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}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "shares": [{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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, "snapshot_count": 0, "snapshot_size": 0, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-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/r006-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"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "id": "r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "name": "my-share-snapshot", "resource_type": "share_snapshot"}, "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, @@ -27362,7 +27207,7 @@ def test_list_shares_value_error(self): """ # Set up mock url = preprocess_url('/shares') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "shares": [{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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:r006-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/r006-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}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "shares": [{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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, "snapshot_count": 0, "snapshot_size": 0, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-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/r006-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"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "id": "r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "name": "my-share-snapshot", "resource_type": "share_snapshot"}, "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, @@ -27372,7 +27217,8 @@ 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()} with pytest.raises(ValueError): @@ -27394,8 +27240,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","accessor_binding_role":"accessor","accessor_bindings":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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:r006-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/r006-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}' + mock_response1 = '{"shares":[{"access_control_mode":"security_group","accessor_binding_role":"accessor","accessor_bindings":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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,"snapshot_count":0,"snapshot_size":0,"source_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-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/r006-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"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4","id":"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4","name":"my-share-snapshot","resource_type":"share_snapshot"},"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/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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,"snapshot_count":0,"snapshot_size":0,"source_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-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/r006-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"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4","id":"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4","name":"my-share-snapshot","resource_type":"share_snapshot"},"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, @@ -27434,8 +27280,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","accessor_binding_role":"accessor","accessor_bindings":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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:r006-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/r006-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}' + mock_response1 = '{"shares":[{"access_control_mode":"security_group","accessor_binding_role":"accessor","accessor_bindings":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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,"snapshot_count":0,"snapshot_size":0,"source_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-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/r006-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"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4","id":"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4","name":"my-share-snapshot","resource_type":"share_snapshot"},"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/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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,"snapshot_count":0,"snapshot_size":0,"source_share":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-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/r006-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"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4","id":"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4","name":"my-share-snapshot","resource_type":"share_snapshot"},"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, @@ -27477,7 +27323,7 @@ def test_create_share_all_params(self): """ # Set up mock url = preprocess_url('/shares') - mock_response = '{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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:r006-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/r006-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"}}' + mock_response = '{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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, "snapshot_count": 0, "snapshot_size": 0, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-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/r006-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"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "id": "r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "name": "my-share-snapshot", "resource_type": "share_snapshot"}, "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, @@ -27515,27 +27361,19 @@ def test_create_share_all_params(self): 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['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['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['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 = {} @@ -27559,9 +27397,7 @@ def test_create_share_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 ShareInitialOwner model share_initial_owner_model = {} @@ -27616,7 +27452,7 @@ def test_create_share_value_error(self): """ # Set up mock url = preprocess_url('/shares') - mock_response = '{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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:r006-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/r006-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"}}' + mock_response = '{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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, "snapshot_count": 0, "snapshot_size": 0, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-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/r006-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"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "id": "r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "name": "my-share-snapshot", "resource_type": "share_snapshot"}, "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, @@ -27654,27 +27490,19 @@ def test_create_share_value_error(self): 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['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['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['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 = {} @@ -27698,9 +27526,7 @@ def test_create_share_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 ShareInitialOwner model share_initial_owner_model = {} @@ -27757,7 +27583,7 @@ def test_delete_share_all_params(self): """ # Set up mock url = preprocess_url('/shares/testString') - mock_response = '{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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:r006-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/r006-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"}}' + mock_response = '{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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, "snapshot_count": 0, "snapshot_size": 0, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-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/r006-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"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "id": "r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "name": "my-share-snapshot", "resource_type": "share_snapshot"}, "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, @@ -27797,7 +27623,7 @@ def test_delete_share_required_params(self): """ # Set up mock url = preprocess_url('/shares/testString') - mock_response = '{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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:r006-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/r006-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"}}' + mock_response = '{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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, "snapshot_count": 0, "snapshot_size": 0, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-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/r006-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"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "id": "r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "name": "my-share-snapshot", "resource_type": "share_snapshot"}, "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, @@ -27835,7 +27661,7 @@ def test_delete_share_value_error(self): """ # Set up mock url = preprocess_url('/shares/testString') - mock_response = '{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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:r006-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/r006-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"}}' + mock_response = '{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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, "snapshot_count": 0, "snapshot_size": 0, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-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/r006-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"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "id": "r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "name": "my-share-snapshot", "resource_type": "share_snapshot"}, "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, @@ -27878,7 +27704,7 @@ def test_get_share_all_params(self): """ # Set up mock url = preprocess_url('/shares/testString') - mock_response = '{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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:r006-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/r006-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"}}' + mock_response = '{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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, "snapshot_count": 0, "snapshot_size": 0, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-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/r006-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"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "id": "r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "name": "my-share-snapshot", "resource_type": "share_snapshot"}, "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, @@ -27916,7 +27742,7 @@ def test_get_share_value_error(self): """ # Set up mock url = preprocess_url('/shares/testString') - mock_response = '{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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:r006-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/r006-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"}}' + mock_response = '{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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, "snapshot_count": 0, "snapshot_size": 0, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-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/r006-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"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "id": "r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "name": "my-share-snapshot", "resource_type": "share_snapshot"}, "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, @@ -27959,7 +27785,7 @@ def test_update_share_all_params(self): """ # Set up mock url = preprocess_url('/shares/testString') - mock_response = '{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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:r006-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/r006-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"}}' + mock_response = '{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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, "snapshot_count": 0, "snapshot_size": 0, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-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/r006-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"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "id": "r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "name": "my-share-snapshot", "resource_type": "share_snapshot"}, "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, @@ -28019,7 +27845,7 @@ def test_update_share_required_params(self): """ # Set up mock url = preprocess_url('/shares/testString') - mock_response = '{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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:r006-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/r006-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"}}' + mock_response = '{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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, "snapshot_count": 0, "snapshot_size": 0, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-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/r006-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"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "id": "r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "name": "my-share-snapshot", "resource_type": "share_snapshot"}, "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, @@ -28077,7 +27903,7 @@ def test_update_share_value_error(self): """ # Set up mock url = preprocess_url('/shares/testString') - mock_response = '{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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:r006-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/r006-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"}}' + mock_response = '{"access_control_mode": "security_group", "accessor_binding_role": "accessor", "accessor_bindings": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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:r006-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/r006-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/r006-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:r006-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/r006-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:r006-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/r006-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, "snapshot_count": 0, "snapshot_size": 0, "source_share": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-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/r006-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"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "id": "r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "name": "my-share-snapshot", "resource_type": "share_snapshot"}, "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, @@ -28860,27 +28686,19 @@ def test_create_share_mount_target_all_params(self): 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['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['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['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' @@ -28954,27 +28772,19 @@ def test_create_share_mount_target_value_error(self): 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['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['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['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' @@ -29270,6 +29080,632 @@ def test_update_share_mount_target_value_error_with_retries(self): self.test_update_share_mount_target_value_error() +class TestListShareSnapshots: + """ + Test Class for list_share_snapshots + """ + + @responses.activate + def test_list_share_snapshots_all_params(self): + """ + list_share_snapshots() + """ + # Set up mock + url = preprocess_url('/shares/testString/snapshots') + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}, "captured_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "fingerprint": "7abc3aef-c2bc-4f65-a296-2928e534d498", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "id": "r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "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", "minimum_size": 10, "name": "my-share-snapshot", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share_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"], "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, + body=mock_response, + content_type='application/json', + status=200, + ) + + # Set up parameter values + share_id = 'testString' + backup_policy_plan_id = 'testString' + name = 'my-name' + start = 'testString' + limit = 50 + sort = 'name' + + # Invoke method + response = _service.list_share_snapshots( + share_id, + backup_policy_plan_id=backup_policy_plan_id, + name=name, + start=start, + limit=limit, + sort=sort, + 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 'backup_policy_plan.id={}'.format(backup_policy_plan_id) in query_string + assert 'name={}'.format(name) in query_string + assert 'start={}'.format(start) in query_string + assert 'limit={}'.format(limit) in query_string + assert 'sort={}'.format(sort) in query_string + + def test_list_share_snapshots_all_params_with_retries(self): + # Enable retries and run test_list_share_snapshots_all_params. + _service.enable_retries() + self.test_list_share_snapshots_all_params() + + # Disable retries and run test_list_share_snapshots_all_params. + _service.disable_retries() + self.test_list_share_snapshots_all_params() + + @responses.activate + def test_list_share_snapshots_required_params(self): + """ + test_list_share_snapshots_required_params() + """ + # Set up mock + url = preprocess_url('/shares/testString/snapshots') + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}, "captured_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "fingerprint": "7abc3aef-c2bc-4f65-a296-2928e534d498", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "id": "r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "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", "minimum_size": 10, "name": "my-share-snapshot", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share_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"], "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, + body=mock_response, + content_type='application/json', + status=200, + ) + + # Set up parameter values + share_id = 'testString' + + # Invoke method + response = _service.list_share_snapshots( + share_id, + headers={}, + ) + + # Check for correct operation + assert len(responses.calls) == 1 + assert response.status_code == 200 + + def test_list_share_snapshots_required_params_with_retries(self): + # Enable retries and run test_list_share_snapshots_required_params. + _service.enable_retries() + self.test_list_share_snapshots_required_params() + + # Disable retries and run test_list_share_snapshots_required_params. + _service.disable_retries() + self.test_list_share_snapshots_required_params() + + @responses.activate + def test_list_share_snapshots_value_error(self): + """ + test_list_share_snapshots_value_error() + """ + # Set up mock + url = preprocess_url('/shares/testString/snapshots') + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}, "captured_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "fingerprint": "7abc3aef-c2bc-4f65-a296-2928e534d498", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "id": "r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "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", "minimum_size": 10, "name": "my-share-snapshot", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share_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"], "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, + body=mock_response, + content_type='application/json', + status=200, + ) + + # Set up parameter values + share_id = 'testString' + + # Pass in all but one required param and check for a ValueError + req_param_dict = { + "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()} + with pytest.raises(ValueError): + _service.list_share_snapshots(**req_copy) + + def test_list_share_snapshots_value_error_with_retries(self): + # Enable retries and run test_list_share_snapshots_value_error. + _service.enable_retries() + self.test_list_share_snapshots_value_error() + + # Disable retries and run test_list_share_snapshots_value_error. + _service.disable_retries() + self.test_list_share_snapshots_value_error() + + @responses.activate + def test_list_share_snapshots_with_pager_get_next(self): + """ + test_list_share_snapshots_with_pager_get_next() + """ + # Set up a two-page mock response + url = preprocess_url('/shares/testString/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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r006-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"},"captured_at":"2019-01-01T12:00:00.000Z","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4","fingerprint":"7abc3aef-c2bc-4f65-a296-2928e534d498","href":"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4","id":"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4","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","minimum_size":10,"name":"my-share-snapshot","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"share_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"],"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 = '{"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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r006-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"},"captured_at":"2019-01-01T12:00:00.000Z","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4","fingerprint":"7abc3aef-c2bc-4f65-a296-2928e534d498","href":"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4","id":"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4","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","minimum_size":10,"name":"my-share-snapshot","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"share_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"],"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, + 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 = ShareSnapshotsPager( + client=_service, + share_id='testString', + backup_policy_plan_id='testString', + name='my-name', + limit=10, + sort='name', + ) + 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_snapshots_with_pager_get_all(self): + """ + test_list_share_snapshots_with_pager_get_all() + """ + # Set up a two-page mock response + url = preprocess_url('/shares/testString/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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r006-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"},"captured_at":"2019-01-01T12:00:00.000Z","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4","fingerprint":"7abc3aef-c2bc-4f65-a296-2928e534d498","href":"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4","id":"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4","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","minimum_size":10,"name":"my-share-snapshot","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"share_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"],"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 = '{"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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r006-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"},"captured_at":"2019-01-01T12:00:00.000Z","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4","fingerprint":"7abc3aef-c2bc-4f65-a296-2928e534d498","href":"https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4","id":"r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4","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","minimum_size":10,"name":"my-share-snapshot","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"share_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"],"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, + 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 = ShareSnapshotsPager( + client=_service, + share_id='testString', + backup_policy_plan_id='testString', + name='my-name', + limit=10, + sort='name', + ) + all_results = pager.get_all() + assert all_results is not None + assert len(all_results) == 2 + + +class TestCreateShareSnapshot: + """ + Test Class for create_share_snapshot + """ + + @responses.activate + def test_create_share_snapshot_all_params(self): + """ + create_share_snapshot() + """ + # Set up mock + url = preprocess_url('/shares/testString/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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}, "captured_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "fingerprint": "7abc3aef-c2bc-4f65-a296-2928e534d498", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "id": "r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "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", "minimum_size": 10, "name": "my-share-snapshot", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share_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"], "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, + body=mock_response, + content_type='application/json', + status=201, + ) + + # Set up parameter values + share_id = 'testString' + name = 'my-share-snapshot' + user_tags = ['testString'] + + # Invoke method + response = _service.create_share_snapshot( + share_id, + name=name, + user_tags=user_tags, + headers={}, + ) + + # Check for correct operation + assert len(responses.calls) == 1 + assert response.status_code == 201 + # Validate body params + req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) + assert req_body['name'] == 'my-share-snapshot' + assert req_body['user_tags'] == ['testString'] + + def test_create_share_snapshot_all_params_with_retries(self): + # Enable retries and run test_create_share_snapshot_all_params. + _service.enable_retries() + self.test_create_share_snapshot_all_params() + + # Disable retries and run test_create_share_snapshot_all_params. + _service.disable_retries() + self.test_create_share_snapshot_all_params() + + @responses.activate + def test_create_share_snapshot_value_error(self): + """ + test_create_share_snapshot_value_error() + """ + # Set up mock + url = preprocess_url('/shares/testString/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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}, "captured_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "fingerprint": "7abc3aef-c2bc-4f65-a296-2928e534d498", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "id": "r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "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", "minimum_size": 10, "name": "my-share-snapshot", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share_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"], "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, + body=mock_response, + content_type='application/json', + status=201, + ) + + # Set up parameter values + share_id = 'testString' + name = 'my-share-snapshot' + user_tags = ['testString'] + + # Pass in all but one required param and check for a ValueError + req_param_dict = { + "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()} + with pytest.raises(ValueError): + _service.create_share_snapshot(**req_copy) + + def test_create_share_snapshot_value_error_with_retries(self): + # Enable retries and run test_create_share_snapshot_value_error. + _service.enable_retries() + self.test_create_share_snapshot_value_error() + + # Disable retries and run test_create_share_snapshot_value_error. + _service.disable_retries() + self.test_create_share_snapshot_value_error() + + +class TestDeleteShareSnapshot: + """ + Test Class for delete_share_snapshot + """ + + @responses.activate + def test_delete_share_snapshot_all_params(self): + """ + delete_share_snapshot() + """ + # Set up mock + url = preprocess_url('/shares/testString/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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}, "captured_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "fingerprint": "7abc3aef-c2bc-4f65-a296-2928e534d498", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "id": "r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "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", "minimum_size": 10, "name": "my-share-snapshot", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share_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"], "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, + body=mock_response, + content_type='application/json', + status=202, + ) + + # Set up parameter values + share_id = 'testString' + id = 'testString' + + # Invoke method + response = _service.delete_share_snapshot( + share_id, + id, + headers={}, + ) + + # Check for correct operation + assert len(responses.calls) == 1 + assert response.status_code == 202 + + def test_delete_share_snapshot_all_params_with_retries(self): + # Enable retries and run test_delete_share_snapshot_all_params. + _service.enable_retries() + self.test_delete_share_snapshot_all_params() + + # Disable retries and run test_delete_share_snapshot_all_params. + _service.disable_retries() + self.test_delete_share_snapshot_all_params() + + @responses.activate + def test_delete_share_snapshot_value_error(self): + """ + test_delete_share_snapshot_value_error() + """ + # Set up mock + url = preprocess_url('/shares/testString/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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}, "captured_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "fingerprint": "7abc3aef-c2bc-4f65-a296-2928e534d498", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "id": "r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "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", "minimum_size": 10, "name": "my-share-snapshot", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share_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"], "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, + body=mock_response, + content_type='application/json', + status=202, + ) + + # 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_snapshot(**req_copy) + + def test_delete_share_snapshot_value_error_with_retries(self): + # Enable retries and run test_delete_share_snapshot_value_error. + _service.enable_retries() + self.test_delete_share_snapshot_value_error() + + # Disable retries and run test_delete_share_snapshot_value_error. + _service.disable_retries() + self.test_delete_share_snapshot_value_error() + + +class TestGetShareSnapshot: + """ + Test Class for get_share_snapshot + """ + + @responses.activate + def test_get_share_snapshot_all_params(self): + """ + get_share_snapshot() + """ + # Set up mock + url = preprocess_url('/shares/testString/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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}, "captured_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "fingerprint": "7abc3aef-c2bc-4f65-a296-2928e534d498", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "id": "r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "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", "minimum_size": 10, "name": "my-share-snapshot", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share_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"], "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, + body=mock_response, + content_type='application/json', + status=200, + ) + + # Set up parameter values + share_id = 'testString' + id = 'testString' + + # Invoke method + response = _service.get_share_snapshot( + share_id, + id, + headers={}, + ) + + # Check for correct operation + assert len(responses.calls) == 1 + assert response.status_code == 200 + + def test_get_share_snapshot_all_params_with_retries(self): + # Enable retries and run test_get_share_snapshot_all_params. + _service.enable_retries() + self.test_get_share_snapshot_all_params() + + # Disable retries and run test_get_share_snapshot_all_params. + _service.disable_retries() + self.test_get_share_snapshot_all_params() + + @responses.activate + def test_get_share_snapshot_value_error(self): + """ + test_get_share_snapshot_value_error() + """ + # Set up mock + url = preprocess_url('/shares/testString/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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}, "captured_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "fingerprint": "7abc3aef-c2bc-4f65-a296-2928e534d498", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "id": "r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "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", "minimum_size": 10, "name": "my-share-snapshot", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share_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"], "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, + 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_snapshot(**req_copy) + + def test_get_share_snapshot_value_error_with_retries(self): + # Enable retries and run test_get_share_snapshot_value_error. + _service.enable_retries() + self.test_get_share_snapshot_value_error() + + # Disable retries and run test_get_share_snapshot_value_error. + _service.disable_retries() + self.test_get_share_snapshot_value_error() + + +class TestUpdateShareSnapshot: + """ + Test Class for update_share_snapshot + """ + + @responses.activate + def test_update_share_snapshot_all_params(self): + """ + update_share_snapshot() + """ + # Set up mock + url = preprocess_url('/shares/testString/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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}, "captured_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "fingerprint": "7abc3aef-c2bc-4f65-a296-2928e534d498", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "id": "r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "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", "minimum_size": 10, "name": "my-share-snapshot", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share_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"], "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, + body=mock_response, + content_type='application/json', + status=200, + ) + + # Construct a dict representation of a ShareSnapshotPatch model + share_snapshot_patch_model = {} + share_snapshot_patch_model['user_tags'] = ['testString'] + + # Set up parameter values + share_id = 'testString' + id = 'testString' + share_snapshot_patch = share_snapshot_patch_model + if_match = 'W/"96d225c4-56bd-43d9-98fc-d7148e5c5028"' + + # Invoke method + response = _service.update_share_snapshot( + share_id, + id, + share_snapshot_patch, + if_match=if_match, + headers={}, + ) + + # Check for correct operation + assert len(responses.calls) == 1 + assert response.status_code == 200 + # Validate body params + req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) + assert req_body == share_snapshot_patch + + def test_update_share_snapshot_all_params_with_retries(self): + # Enable retries and run test_update_share_snapshot_all_params. + _service.enable_retries() + self.test_update_share_snapshot_all_params() + + # Disable retries and run test_update_share_snapshot_all_params. + _service.disable_retries() + self.test_update_share_snapshot_all_params() + + @responses.activate + def test_update_share_snapshot_required_params(self): + """ + test_update_share_snapshot_required_params() + """ + # Set up mock + url = preprocess_url('/shares/testString/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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}, "captured_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "fingerprint": "7abc3aef-c2bc-4f65-a296-2928e534d498", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "id": "r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "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", "minimum_size": 10, "name": "my-share-snapshot", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share_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"], "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, + body=mock_response, + content_type='application/json', + status=200, + ) + + # Construct a dict representation of a ShareSnapshotPatch model + share_snapshot_patch_model = {} + share_snapshot_patch_model['user_tags'] = ['testString'] + + # Set up parameter values + share_id = 'testString' + id = 'testString' + share_snapshot_patch = share_snapshot_patch_model + + # Invoke method + response = _service.update_share_snapshot( + share_id, + id, + share_snapshot_patch, + headers={}, + ) + + # Check for correct operation + assert len(responses.calls) == 1 + assert response.status_code == 200 + # Validate body params + req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) + assert req_body == share_snapshot_patch + + def test_update_share_snapshot_required_params_with_retries(self): + # Enable retries and run test_update_share_snapshot_required_params. + _service.enable_retries() + self.test_update_share_snapshot_required_params() + + # Disable retries and run test_update_share_snapshot_required_params. + _service.disable_retries() + self.test_update_share_snapshot_required_params() + + @responses.activate + def test_update_share_snapshot_value_error(self): + """ + test_update_share_snapshot_value_error() + """ + # Set up mock + url = preprocess_url('/shares/testString/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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}, "captured_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "fingerprint": "7abc3aef-c2bc-4f65-a296-2928e534d498", "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "id": "r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4", "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", "minimum_size": 10, "name": "my-share-snapshot", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "share_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"], "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, + body=mock_response, + content_type='application/json', + status=200, + ) + + # Construct a dict representation of a ShareSnapshotPatch model + share_snapshot_patch_model = {} + share_snapshot_patch_model['user_tags'] = ['testString'] + + # Set up parameter values + share_id = 'testString' + id = 'testString' + share_snapshot_patch = share_snapshot_patch_model + + # Pass in all but one required param and check for a ValueError + req_param_dict = { + "share_id": share_id, + "id": id, + "share_snapshot_patch": share_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()} + with pytest.raises(ValueError): + _service.update_share_snapshot(**req_copy) + + def test_update_share_snapshot_value_error_with_retries(self): + # Enable retries and run test_update_share_snapshot_value_error. + _service.enable_retries() + self.test_update_share_snapshot_value_error() + + # Disable retries and run test_update_share_snapshot_value_error. + _service.disable_retries() + self.test_update_share_snapshot_value_error() + + class TestDeleteShareSource: """ Test Class for delete_share_source @@ -29495,7 +29931,7 @@ def test_list_backup_policies_all_params(self): """ # Set up mock url = preprocess_url('/backup_policies') - mock_response = '{"backup_policies": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["match_user_tags"], "name": "my-backup-policy", "plans": [{"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"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "ebc2b430240943458b9e91e1432cfcce", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"backup_policies": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["match_user_tags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "ebc2b430240943458b9e91e1432cfcce", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -29549,7 +29985,7 @@ def test_list_backup_policies_required_params(self): """ # Set up mock url = preprocess_url('/backup_policies') - mock_response = '{"backup_policies": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["match_user_tags"], "name": "my-backup-policy", "plans": [{"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"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "ebc2b430240943458b9e91e1432cfcce", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"backup_policies": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["match_user_tags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "ebc2b430240943458b9e91e1432cfcce", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -29581,7 +30017,7 @@ def test_list_backup_policies_value_error(self): """ # Set up mock url = preprocess_url('/backup_policies') - mock_response = '{"backup_policies": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["match_user_tags"], "name": "my-backup-policy", "plans": [{"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"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "ebc2b430240943458b9e91e1432cfcce", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"backup_policies": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["match_user_tags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "ebc2b430240943458b9e91e1432cfcce", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -29591,7 +30027,8 @@ 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()} with pytest.raises(ValueError): @@ -29613,8 +30050,8 @@ def test_list_backup_policies_with_pager_get_next(self): """ # Set up a two-page mock response url = preprocess_url('/backup_policies') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"backup_policies":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6","health_reasons":[{"code":"missing_service_authorization_policies","message":"One or more accounts are missing service authorization policies","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6","id":"r134-076191ba-49c2-4763-94fd-c70de73ee2e6","last_job_completed_at":"2019-01-01T12:00:00.000Z","lifecycle_state":"stable","match_user_tags":["match_user_tags"],"name":"my-backup-policy","plans":[{"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"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"backup_policy","scope":{"crn":"crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce","id":"ebc2b430240943458b9e91e1432cfcce","resource_type":"enterprise"},"included_content":["data_volumes"],"match_resource_type":"instance"}],"total_count":2,"limit":1}' - mock_response2 = '{"backup_policies":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6","health_reasons":[{"code":"missing_service_authorization_policies","message":"One or more accounts are missing service authorization policies","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6","id":"r134-076191ba-49c2-4763-94fd-c70de73ee2e6","last_job_completed_at":"2019-01-01T12:00:00.000Z","lifecycle_state":"stable","match_user_tags":["match_user_tags"],"name":"my-backup-policy","plans":[{"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"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"backup_policy","scope":{"crn":"crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce","id":"ebc2b430240943458b9e91e1432cfcce","resource_type":"enterprise"},"included_content":["data_volumes"],"match_resource_type":"instance"}],"total_count":2,"limit":1}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"backup_policies":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6","health_reasons":[{"code":"missing_service_authorization_policies","message":"One or more accounts are missing service authorization policies","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6","id":"r006-076191ba-49c2-4763-94fd-c70de73ee2e6","last_job_completed_at":"2019-01-01T12:00:00.000Z","lifecycle_state":"stable","match_user_tags":["match_user_tags"],"name":"my-backup-policy","plans":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r006-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"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"backup_policy","scope":{"crn":"crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce","id":"ebc2b430240943458b9e91e1432cfcce","resource_type":"enterprise"},"included_content":["data_volumes"],"match_resource_type":"instance"}],"total_count":2,"limit":1}' + mock_response2 = '{"backup_policies":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6","health_reasons":[{"code":"missing_service_authorization_policies","message":"One or more accounts are missing service authorization policies","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6","id":"r006-076191ba-49c2-4763-94fd-c70de73ee2e6","last_job_completed_at":"2019-01-01T12:00:00.000Z","lifecycle_state":"stable","match_user_tags":["match_user_tags"],"name":"my-backup-policy","plans":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r006-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"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"backup_policy","scope":{"crn":"crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce","id":"ebc2b430240943458b9e91e1432cfcce","resource_type":"enterprise"},"included_content":["data_volumes"],"match_resource_type":"instance"}],"total_count":2,"limit":1}' responses.add( responses.GET, url, @@ -29652,8 +30089,8 @@ def test_list_backup_policies_with_pager_get_all(self): """ # Set up a two-page mock response url = preprocess_url('/backup_policies') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"backup_policies":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6","health_reasons":[{"code":"missing_service_authorization_policies","message":"One or more accounts are missing service authorization policies","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6","id":"r134-076191ba-49c2-4763-94fd-c70de73ee2e6","last_job_completed_at":"2019-01-01T12:00:00.000Z","lifecycle_state":"stable","match_user_tags":["match_user_tags"],"name":"my-backup-policy","plans":[{"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"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"backup_policy","scope":{"crn":"crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce","id":"ebc2b430240943458b9e91e1432cfcce","resource_type":"enterprise"},"included_content":["data_volumes"],"match_resource_type":"instance"}],"total_count":2,"limit":1}' - mock_response2 = '{"backup_policies":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6","health_reasons":[{"code":"missing_service_authorization_policies","message":"One or more accounts are missing service authorization policies","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6","id":"r134-076191ba-49c2-4763-94fd-c70de73ee2e6","last_job_completed_at":"2019-01-01T12:00:00.000Z","lifecycle_state":"stable","match_user_tags":["match_user_tags"],"name":"my-backup-policy","plans":[{"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"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"backup_policy","scope":{"crn":"crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce","id":"ebc2b430240943458b9e91e1432cfcce","resource_type":"enterprise"},"included_content":["data_volumes"],"match_resource_type":"instance"}],"total_count":2,"limit":1}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"backup_policies":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6","health_reasons":[{"code":"missing_service_authorization_policies","message":"One or more accounts are missing service authorization policies","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6","id":"r006-076191ba-49c2-4763-94fd-c70de73ee2e6","last_job_completed_at":"2019-01-01T12:00:00.000Z","lifecycle_state":"stable","match_user_tags":["match_user_tags"],"name":"my-backup-policy","plans":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r006-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"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"backup_policy","scope":{"crn":"crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce","id":"ebc2b430240943458b9e91e1432cfcce","resource_type":"enterprise"},"included_content":["data_volumes"],"match_resource_type":"instance"}],"total_count":2,"limit":1}' + mock_response2 = '{"backup_policies":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6","health_reasons":[{"code":"missing_service_authorization_policies","message":"One or more accounts are missing service authorization policies","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}],"health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6","id":"r006-076191ba-49c2-4763-94fd-c70de73ee2e6","last_job_completed_at":"2019-01-01T12:00:00.000Z","lifecycle_state":"stable","match_user_tags":["match_user_tags"],"name":"my-backup-policy","plans":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r006-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"}],"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"backup_policy","scope":{"crn":"crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce","id":"ebc2b430240943458b9e91e1432cfcce","resource_type":"enterprise"},"included_content":["data_volumes"],"match_resource_type":"instance"}],"total_count":2,"limit":1}' responses.add( responses.GET, url, @@ -29694,7 +30131,7 @@ def test_create_backup_policy_all_params(self): """ # Set up mock url = preprocess_url('/backup_policies') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["match_user_tags"], "name": "my-backup-policy", "plans": [{"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"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "ebc2b430240943458b9e91e1432cfcce", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["match_user_tags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "ebc2b430240943458b9e91e1432cfcce", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}' responses.add( responses.POST, url, @@ -29719,9 +30156,7 @@ def test_create_backup_policy_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 = {} @@ -29742,9 +30177,7 @@ def test_create_backup_policy_all_params(self): 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['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 = {} @@ -29752,9 +30185,7 @@ 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 = {} @@ -29797,7 +30228,7 @@ def test_create_backup_policy_value_error(self): """ # Set up mock url = preprocess_url('/backup_policies') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["match_user_tags"], "name": "my-backup-policy", "plans": [{"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"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "ebc2b430240943458b9e91e1432cfcce", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["match_user_tags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "ebc2b430240943458b9e91e1432cfcce", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}' responses.add( responses.POST, url, @@ -29822,9 +30253,7 @@ def test_create_backup_policy_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 = {} @@ -29845,9 +30274,7 @@ def test_create_backup_policy_value_error(self): 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['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 = {} @@ -29855,9 +30282,7 @@ 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 = {} @@ -29902,7 +30327,7 @@ def test_list_backup_policy_jobs_all_params(self): """ # Set up mock url = preprocess_url('/backup_policies/testString/jobs') - mock_response = '{"first": {"href": "href"}, "jobs": [{"auto_delete": true, "auto_delete_after": 90, "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"}, "completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/0fe9e5d8-0a4d-4818-96ec-e99708644a58/jobs/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "job_type": "creation", "resource_type": "backup_policy_job", "source": {"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": "failed", "status_reasons": [{"code": "source_volume_busy", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot"}], "target_snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}], "limit": 20, "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "jobs": [{"auto_delete": true, "auto_delete_after": 90, "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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}, "completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/jobs/r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90", "id": "r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90", "job_type": "creation", "resource_type": "backup_policy_job", "source": {"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": "failed", "status_reasons": [{"code": "source_volume_busy", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot"}], "target_snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}], "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -29920,7 +30345,7 @@ def test_list_backup_policy_jobs_all_params(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:r006-f6bfa329-0e36-433f-a3bb-0df632e79263' # Invoke method response = _service.list_backup_policy_jobs( @@ -29967,7 +30392,7 @@ def test_list_backup_policy_jobs_required_params(self): """ # Set up mock url = preprocess_url('/backup_policies/testString/jobs') - mock_response = '{"first": {"href": "href"}, "jobs": [{"auto_delete": true, "auto_delete_after": 90, "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"}, "completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/0fe9e5d8-0a4d-4818-96ec-e99708644a58/jobs/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "job_type": "creation", "resource_type": "backup_policy_job", "source": {"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": "failed", "status_reasons": [{"code": "source_volume_busy", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot"}], "target_snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}], "limit": 20, "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "jobs": [{"auto_delete": true, "auto_delete_after": 90, "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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}, "completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/jobs/r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90", "id": "r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90", "job_type": "creation", "resource_type": "backup_policy_job", "source": {"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": "failed", "status_reasons": [{"code": "source_volume_busy", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot"}], "target_snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}], "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -30005,7 +30430,7 @@ def test_list_backup_policy_jobs_value_error(self): """ # Set up mock url = preprocess_url('/backup_policies/testString/jobs') - mock_response = '{"first": {"href": "href"}, "jobs": [{"auto_delete": true, "auto_delete_after": 90, "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"}, "completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/0fe9e5d8-0a4d-4818-96ec-e99708644a58/jobs/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "job_type": "creation", "resource_type": "backup_policy_job", "source": {"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": "failed", "status_reasons": [{"code": "source_volume_busy", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot"}], "target_snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}], "limit": 20, "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "jobs": [{"auto_delete": true, "auto_delete_after": 90, "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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}, "completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/jobs/r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90", "id": "r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90", "job_type": "creation", "resource_type": "backup_policy_job", "source": {"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": "failed", "status_reasons": [{"code": "source_volume_busy", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot"}], "target_snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}], "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -30042,8 +30467,8 @@ def test_list_backup_policy_jobs_with_pager_get_next(self): """ # Set up a two-page mock response url = preprocess_url('/backup_policies/testString/jobs') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"jobs":[{"auto_delete":true,"auto_delete_after":90,"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"},"completed_at":"2019-01-01T12:00:00.000Z","created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/0fe9e5d8-0a4d-4818-96ec-e99708644a58/jobs/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","job_type":"creation","resource_type":"backup_policy_job","source":{"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":"failed","status_reasons":[{"code":"source_volume_busy","message":"message","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot"}],"target_snapshots":[{"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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}]}],"limit":1}' - mock_response2 = '{"total_count":2,"jobs":[{"auto_delete":true,"auto_delete_after":90,"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"},"completed_at":"2019-01-01T12:00:00.000Z","created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/0fe9e5d8-0a4d-4818-96ec-e99708644a58/jobs/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","job_type":"creation","resource_type":"backup_policy_job","source":{"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":"failed","status_reasons":[{"code":"source_volume_busy","message":"message","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot"}],"target_snapshots":[{"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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}]}],"limit":1}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"jobs":[{"auto_delete":true,"auto_delete_after":90,"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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r006-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"},"completed_at":"2019-01-01T12:00:00.000Z","created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/jobs/r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90","id":"r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90","job_type":"creation","resource_type":"backup_policy_job","source":{"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":"failed","status_reasons":[{"code":"source_volume_busy","message":"message","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot"}],"target_snapshots":[{"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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}]}],"limit":1}' + mock_response2 = '{"total_count":2,"jobs":[{"auto_delete":true,"auto_delete_after":90,"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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r006-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"},"completed_at":"2019-01-01T12:00:00.000Z","created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/jobs/r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90","id":"r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90","job_type":"creation","resource_type":"backup_policy_job","source":{"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":"failed","status_reasons":[{"code":"source_volume_busy","message":"message","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot"}],"target_snapshots":[{"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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}]}],"limit":1}' responses.add( responses.GET, url, @@ -30070,7 +30495,7 @@ 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:r006-f6bfa329-0e36-433f-a3bb-0df632e79263', ) while pager.has_next(): next_page = pager.get_next() @@ -30085,8 +30510,8 @@ def test_list_backup_policy_jobs_with_pager_get_all(self): """ # Set up a two-page mock response url = preprocess_url('/backup_policies/testString/jobs') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"jobs":[{"auto_delete":true,"auto_delete_after":90,"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"},"completed_at":"2019-01-01T12:00:00.000Z","created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/0fe9e5d8-0a4d-4818-96ec-e99708644a58/jobs/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","job_type":"creation","resource_type":"backup_policy_job","source":{"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":"failed","status_reasons":[{"code":"source_volume_busy","message":"message","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot"}],"target_snapshots":[{"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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}]}],"limit":1}' - mock_response2 = '{"total_count":2,"jobs":[{"auto_delete":true,"auto_delete_after":90,"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"},"completed_at":"2019-01-01T12:00:00.000Z","created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/0fe9e5d8-0a4d-4818-96ec-e99708644a58/jobs/4cf9171a-0043-4434-8727-15b53dbc374c","id":"4cf9171a-0043-4434-8727-15b53dbc374c","job_type":"creation","resource_type":"backup_policy_job","source":{"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":"failed","status_reasons":[{"code":"source_volume_busy","message":"message","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot"}],"target_snapshots":[{"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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}]}],"limit":1}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"jobs":[{"auto_delete":true,"auto_delete_after":90,"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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r006-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"},"completed_at":"2019-01-01T12:00:00.000Z","created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/jobs/r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90","id":"r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90","job_type":"creation","resource_type":"backup_policy_job","source":{"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":"failed","status_reasons":[{"code":"source_volume_busy","message":"message","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot"}],"target_snapshots":[{"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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}]}],"limit":1}' + mock_response2 = '{"total_count":2,"jobs":[{"auto_delete":true,"auto_delete_after":90,"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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178","id":"r006-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"},"completed_at":"2019-01-01T12:00:00.000Z","created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/jobs/r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90","id":"r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90","job_type":"creation","resource_type":"backup_policy_job","source":{"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":"failed","status_reasons":[{"code":"source_volume_busy","message":"message","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot"}],"target_snapshots":[{"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":{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"region":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south","name":"us-south"}},"resource_type":"snapshot"}]}],"limit":1}' responses.add( responses.GET, url, @@ -30112,7 +30537,7 @@ 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:r006-f6bfa329-0e36-433f-a3bb-0df632e79263', ) all_results = pager.get_all() assert all_results is not None @@ -30131,7 +30556,7 @@ def test_get_backup_policy_job_all_params(self): """ # Set up mock url = preprocess_url('/backup_policies/testString/jobs/testString') - mock_response = '{"auto_delete": true, "auto_delete_after": 90, "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"}, "completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/0fe9e5d8-0a4d-4818-96ec-e99708644a58/jobs/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "job_type": "creation", "resource_type": "backup_policy_job", "source": {"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": "failed", "status_reasons": [{"code": "source_volume_busy", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot"}], "target_snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}' + mock_response = '{"auto_delete": true, "auto_delete_after": 90, "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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}, "completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/jobs/r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90", "id": "r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90", "job_type": "creation", "resource_type": "backup_policy_job", "source": {"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": "failed", "status_reasons": [{"code": "source_volume_busy", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot"}], "target_snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}' responses.add( responses.GET, url, @@ -30171,7 +30596,7 @@ def test_get_backup_policy_job_value_error(self): """ # Set up mock url = preprocess_url('/backup_policies/testString/jobs/testString') - mock_response = '{"auto_delete": true, "auto_delete_after": 90, "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"}, "completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/0fe9e5d8-0a4d-4818-96ec-e99708644a58/jobs/4cf9171a-0043-4434-8727-15b53dbc374c", "id": "4cf9171a-0043-4434-8727-15b53dbc374c", "job_type": "creation", "resource_type": "backup_policy_job", "source": {"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": "failed", "status_reasons": [{"code": "source_volume_busy", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot"}], "target_snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}' + mock_response = '{"auto_delete": true, "auto_delete_after": 90, "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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}, "completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/jobs/r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90", "id": "r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90", "job_type": "creation", "resource_type": "backup_policy_job", "source": {"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": "failed", "status_reasons": [{"code": "source_volume_busy", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-baas-troubleshoot"}], "target_snapshots": [{"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": {"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}, "resource_type": "snapshot"}]}' responses.add( responses.GET, url, @@ -30216,7 +30641,7 @@ def test_list_backup_policy_plans_all_params(self): """ # Set up mock url = preprocess_url('/backup_policies/testString/plans') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "plans": [{"active": true, "attach_user_tags": ["attach_user_tags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "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", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}], "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "plans": [{"active": true, "attach_user_tags": ["attach_user_tags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}], "total_count": 132}' responses.add( responses.GET, url, @@ -30260,7 +30685,7 @@ def test_list_backup_policy_plans_required_params(self): """ # Set up mock url = preprocess_url('/backup_policies/testString/plans') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "plans": [{"active": true, "attach_user_tags": ["attach_user_tags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "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", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}], "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "plans": [{"active": true, "attach_user_tags": ["attach_user_tags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}], "total_count": 132}' responses.add( responses.GET, url, @@ -30298,7 +30723,7 @@ def test_list_backup_policy_plans_value_error(self): """ # Set up mock url = preprocess_url('/backup_policies/testString/plans') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "plans": [{"active": true, "attach_user_tags": ["attach_user_tags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "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", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}], "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "plans": [{"active": true, "attach_user_tags": ["attach_user_tags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}], "total_count": 132}' responses.add( responses.GET, url, @@ -30341,7 +30766,7 @@ def test_create_backup_policy_plan_all_params(self): """ # Set up mock url = preprocess_url('/backup_policies/testString/plans') - mock_response = '{"active": true, "attach_user_tags": ["attach_user_tags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "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", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}' + mock_response = '{"active": true, "attach_user_tags": ["attach_user_tags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}' responses.add( responses.POST, url, @@ -30366,9 +30791,7 @@ def test_create_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 = {} @@ -30435,7 +30858,7 @@ def test_create_backup_policy_plan_value_error(self): """ # Set up mock url = preprocess_url('/backup_policies/testString/plans') - mock_response = '{"active": true, "attach_user_tags": ["attach_user_tags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "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", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}' + mock_response = '{"active": true, "attach_user_tags": ["attach_user_tags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}' responses.add( responses.POST, url, @@ -30460,9 +30883,7 @@ def test_create_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 = {} @@ -30517,7 +30938,7 @@ def test_delete_backup_policy_plan_all_params(self): """ # Set up mock url = preprocess_url('/backup_policies/testString/plans/testString') - mock_response = '{"active": true, "attach_user_tags": ["attach_user_tags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "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", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}' + mock_response = '{"active": true, "attach_user_tags": ["attach_user_tags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}' responses.add( responses.DELETE, url, @@ -30559,7 +30980,7 @@ def test_delete_backup_policy_plan_required_params(self): """ # Set up mock url = preprocess_url('/backup_policies/testString/plans/testString') - mock_response = '{"active": true, "attach_user_tags": ["attach_user_tags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "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", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}' + mock_response = '{"active": true, "attach_user_tags": ["attach_user_tags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}' responses.add( responses.DELETE, url, @@ -30599,7 +31020,7 @@ def test_delete_backup_policy_plan_value_error(self): """ # Set up mock url = preprocess_url('/backup_policies/testString/plans/testString') - mock_response = '{"active": true, "attach_user_tags": ["attach_user_tags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "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", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}' + mock_response = '{"active": true, "attach_user_tags": ["attach_user_tags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}' responses.add( responses.DELETE, url, @@ -30644,7 +31065,7 @@ def test_get_backup_policy_plan_all_params(self): """ # Set up mock url = preprocess_url('/backup_policies/testString/plans/testString') - mock_response = '{"active": true, "attach_user_tags": ["attach_user_tags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "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", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}' + mock_response = '{"active": true, "attach_user_tags": ["attach_user_tags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}' responses.add( responses.GET, url, @@ -30684,7 +31105,7 @@ def test_get_backup_policy_plan_value_error(self): """ # Set up mock url = preprocess_url('/backup_policies/testString/plans/testString') - mock_response = '{"active": true, "attach_user_tags": ["attach_user_tags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "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", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}' + mock_response = '{"active": true, "attach_user_tags": ["attach_user_tags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}' responses.add( responses.GET, url, @@ -30729,7 +31150,7 @@ def test_update_backup_policy_plan_all_params(self): """ # Set up mock url = preprocess_url('/backup_policies/testString/plans/testString') - mock_response = '{"active": true, "attach_user_tags": ["attach_user_tags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "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", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}' + mock_response = '{"active": true, "attach_user_tags": ["attach_user_tags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}' responses.add( responses.PATCH, url, @@ -30754,9 +31175,7 @@ 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 = {} @@ -30773,13 +31192,11 @@ def test_update_backup_policy_plan_all_params(self): 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['copy_user_tags'] = True + backup_policy_plan_patch_model['copy_user_tags'] = False 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['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' @@ -30819,7 +31236,7 @@ def test_update_backup_policy_plan_required_params(self): """ # Set up mock url = preprocess_url('/backup_policies/testString/plans/testString') - mock_response = '{"active": true, "attach_user_tags": ["attach_user_tags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "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", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}' + mock_response = '{"active": true, "attach_user_tags": ["attach_user_tags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}' responses.add( responses.PATCH, url, @@ -30844,9 +31261,7 @@ 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 = {} @@ -30863,13 +31278,11 @@ def test_update_backup_policy_plan_required_params(self): 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['copy_user_tags'] = True + backup_policy_plan_patch_model['copy_user_tags'] = False 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['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' @@ -30907,7 +31320,7 @@ def test_update_backup_policy_plan_value_error(self): """ # Set up mock url = preprocess_url('/backup_policies/testString/plans/testString') - mock_response = '{"active": true, "attach_user_tags": ["attach_user_tags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "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", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}' + mock_response = '{"active": true, "attach_user_tags": ["attach_user_tags"], "clone_policy": {"max_snapshots": 1, "zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}]}, "copy_user_tags": true, "created_at": "2019-01-01T12:00:00.000Z", "cron_spec": "30 */2 * * 1-5", "deletion_trigger": {"delete_after": 20, "delete_over_count": 20}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "lifecycle_state": "stable", "name": "my-policy-plan", "remote_region_policies": [{"delete_over_count": 1, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}}], "resource_type": "backup_policy_plan"}' responses.add( responses.PATCH, url, @@ -30932,9 +31345,7 @@ 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 = {} @@ -30951,13 +31362,11 @@ def test_update_backup_policy_plan_value_error(self): 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['copy_user_tags'] = True + backup_policy_plan_patch_model['copy_user_tags'] = False 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['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' @@ -30997,7 +31406,7 @@ def test_delete_backup_policy_all_params(self): """ # Set up mock url = preprocess_url('/backup_policies/testString') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["match_user_tags"], "name": "my-backup-policy", "plans": [{"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"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "ebc2b430240943458b9e91e1432cfcce", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["match_user_tags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "ebc2b430240943458b9e91e1432cfcce", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}' responses.add( responses.DELETE, url, @@ -31037,7 +31446,7 @@ def test_delete_backup_policy_required_params(self): """ # Set up mock url = preprocess_url('/backup_policies/testString') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["match_user_tags"], "name": "my-backup-policy", "plans": [{"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"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "ebc2b430240943458b9e91e1432cfcce", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["match_user_tags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "ebc2b430240943458b9e91e1432cfcce", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}' responses.add( responses.DELETE, url, @@ -31075,7 +31484,7 @@ def test_delete_backup_policy_value_error(self): """ # Set up mock url = preprocess_url('/backup_policies/testString') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["match_user_tags"], "name": "my-backup-policy", "plans": [{"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"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "ebc2b430240943458b9e91e1432cfcce", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["match_user_tags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "ebc2b430240943458b9e91e1432cfcce", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}' responses.add( responses.DELETE, url, @@ -31118,7 +31527,7 @@ def test_get_backup_policy_all_params(self): """ # Set up mock url = preprocess_url('/backup_policies/testString') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["match_user_tags"], "name": "my-backup-policy", "plans": [{"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"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "ebc2b430240943458b9e91e1432cfcce", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["match_user_tags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "ebc2b430240943458b9e91e1432cfcce", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}' responses.add( responses.GET, url, @@ -31156,7 +31565,7 @@ def test_get_backup_policy_value_error(self): """ # Set up mock url = preprocess_url('/backup_policies/testString') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["match_user_tags"], "name": "my-backup-policy", "plans": [{"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"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "ebc2b430240943458b9e91e1432cfcce", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["match_user_tags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "ebc2b430240943458b9e91e1432cfcce", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}' responses.add( responses.GET, url, @@ -31199,7 +31608,7 @@ def test_update_backup_policy_all_params(self): """ # Set up mock url = preprocess_url('/backup_policies/testString') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["match_user_tags"], "name": "my-backup-policy", "plans": [{"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"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "ebc2b430240943458b9e91e1432cfcce", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["match_user_tags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "ebc2b430240943458b9e91e1432cfcce", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}' responses.add( responses.PATCH, url, @@ -31211,7 +31620,7 @@ 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-tag-1', 'my-tag-2', 'my-tag-3'] backup_policy_patch_model['name'] = 'my-backup-policy' # Set up parameter values @@ -31250,7 +31659,7 @@ def test_update_backup_policy_required_params(self): """ # Set up mock url = preprocess_url('/backup_policies/testString') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["match_user_tags"], "name": "my-backup-policy", "plans": [{"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"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "ebc2b430240943458b9e91e1432cfcce", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["match_user_tags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "ebc2b430240943458b9e91e1432cfcce", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}' responses.add( responses.PATCH, url, @@ -31262,7 +31671,7 @@ 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-tag-1', 'my-tag-2', 'my-tag-3'] backup_policy_patch_model['name'] = 'my-backup-policy' # Set up parameter values @@ -31299,7 +31708,7 @@ def test_update_backup_policy_value_error(self): """ # Set up mock url = preprocess_url('/backup_policies/testString') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["match_user_tags"], "name": "my-backup-policy", "plans": [{"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"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "ebc2b430240943458b9e91e1432cfcce", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "health_reasons": [{"code": "missing_service_authorization_policies", "message": "One or more accounts are missing service authorization policies", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui"}], "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "id": "r006-076191ba-49c2-4763-94fd-c70de73ee2e6", "last_job_completed_at": "2019-01-01T12:00:00.000Z", "lifecycle_state": "stable", "match_user_tags": ["match_user_tags"], "name": "my-backup-policy", "plans": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r006-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"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "backup_policy", "scope": {"crn": "crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce", "id": "ebc2b430240943458b9e91e1432cfcce", "resource_type": "enterprise"}, "included_content": ["data_volumes"], "match_resource_type": "instance"}' responses.add( responses.PATCH, url, @@ -31311,7 +31720,7 @@ 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-tag-1', 'my-tag-2', 'my-tag-3'] backup_policy_patch_model['name'] = 'my-backup-policy' # Set up parameter values @@ -31449,7 +31858,8 @@ 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()} with pytest.raises(ValueError): @@ -31871,7 +32281,8 @@ 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()} with pytest.raises(ValueError): @@ -32100,7 +32511,8 @@ def test_create_virtual_network_interface_value_error(self): 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()} with pytest.raises(ValueError): @@ -33444,7 +33856,8 @@ def test_list_cluster_network_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()} with pytest.raises(ValueError): @@ -33727,7 +34140,8 @@ def test_list_cluster_networks_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()} with pytest.raises(ValueError): @@ -36442,7 +36856,7 @@ def test_list_public_gateways_all_params(self): """ # Set up mock url = preprocess_url('/public_gateways') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "public_gateways": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "id": "r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "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": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "public_gateways": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "id": "r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "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": 132}' responses.add( responses.GET, url, @@ -36490,7 +36904,7 @@ def test_list_public_gateways_required_params(self): """ # Set up mock url = preprocess_url('/public_gateways') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "public_gateways": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "id": "r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "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": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "public_gateways": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "id": "r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "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": 132}' responses.add( responses.GET, url, @@ -36522,7 +36936,7 @@ def test_list_public_gateways_value_error(self): """ # Set up mock url = preprocess_url('/public_gateways') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "public_gateways": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "id": "r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "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": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "public_gateways": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "id": "r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "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": 132}' responses.add( responses.GET, url, @@ -36532,7 +36946,8 @@ 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()} with pytest.raises(ValueError): @@ -36554,8 +36969,8 @@ def test_list_public_gateways_with_pager_get_next(self): """ # Set up a two-page mock response url = preprocess_url('/public_gateways') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"public_gateways":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241","floating_ip":{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd","id":"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd","name":"my-floating-ip"},"href":"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241","id":"dc5431ef-1fc6-4861-adc9-a59d077d1241","name":"my-public-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"public_gateway","status":"available","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_response2 = '{"total_count":2,"limit":1,"public_gateways":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241","floating_ip":{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd","id":"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd","name":"my-floating-ip"},"href":"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241","id":"dc5431ef-1fc6-4861-adc9-a59d077d1241","name":"my-public-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"public_gateway","status":"available","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_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"public_gateways":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241","floating_ip":{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd","id":"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd","name":"my-floating-ip"},"href":"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241","id":"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241","name":"my-public-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"public_gateway","status":"available","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_response2 = '{"total_count":2,"limit":1,"public_gateways":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241","floating_ip":{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd","id":"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd","name":"my-floating-ip"},"href":"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241","id":"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241","name":"my-public-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"public_gateway","status":"available","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, @@ -36591,8 +37006,8 @@ def test_list_public_gateways_with_pager_get_all(self): """ # Set up a two-page mock response url = preprocess_url('/public_gateways') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"public_gateways":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241","floating_ip":{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd","id":"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd","name":"my-floating-ip"},"href":"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241","id":"dc5431ef-1fc6-4861-adc9-a59d077d1241","name":"my-public-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"public_gateway","status":"available","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_response2 = '{"total_count":2,"limit":1,"public_gateways":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241","floating_ip":{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd","id":"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd","name":"my-floating-ip"},"href":"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241","id":"dc5431ef-1fc6-4861-adc9-a59d077d1241","name":"my-public-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"public_gateway","status":"available","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_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"public_gateways":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241","floating_ip":{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd","id":"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd","name":"my-floating-ip"},"href":"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241","id":"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241","name":"my-public-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"public_gateway","status":"available","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_response2 = '{"total_count":2,"limit":1,"public_gateways":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241","floating_ip":{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd","id":"r006-f45e0d90-12a8-4460-8210-290ff2ab75cd","name":"my-floating-ip"},"href":"https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241","id":"r006-dc5431ef-1fc6-4861-adc9-a59d077d1241","name":"my-public-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"public_gateway","status":"available","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, @@ -36631,7 +37046,7 @@ def test_create_public_gateway_all_params(self): """ # Set up mock url = preprocess_url('/public_gateways') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "id": "r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "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 = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "id": "r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "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, @@ -36700,7 +37115,7 @@ def test_create_public_gateway_value_error(self): """ # Set up mock url = preprocess_url('/public_gateways') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "id": "r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "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 = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "id": "r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "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, @@ -36839,7 +37254,7 @@ def test_get_public_gateway_all_params(self): """ # Set up mock url = preprocess_url('/public_gateways/testString') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "id": "r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "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 = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "id": "r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "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, @@ -36877,7 +37292,7 @@ def test_get_public_gateway_value_error(self): """ # Set up mock url = preprocess_url('/public_gateways/testString') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "id": "r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "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 = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "id": "r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "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, @@ -36920,7 +37335,7 @@ def test_update_public_gateway_all_params(self): """ # Set up mock url = preprocess_url('/public_gateways/testString') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "id": "r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "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 = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "id": "r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "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, @@ -36931,7 +37346,7 @@ def test_update_public_gateway_all_params(self): # Construct a dict representation of a PublicGatewayPatch model public_gateway_patch_model = {} - public_gateway_patch_model['name'] = 'my-public-gateway' + public_gateway_patch_model['name'] = 'my-public-gateway-updated' # Set up parameter values id = 'testString' @@ -36967,7 +37382,7 @@ def test_update_public_gateway_value_error(self): """ # Set up mock url = preprocess_url('/public_gateways/testString') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "id": "r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "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 = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "id": "r006-f45e0d90-12a8-4460-8210-290ff2ab75cd", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "id": "r006-dc5431ef-1fc6-4861-adc9-a59d077d1241", "name": "my-public-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "public_gateway", "status": "available", "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, @@ -36978,7 +37393,7 @@ def test_update_public_gateway_value_error(self): # Construct a dict representation of a PublicGatewayPatch model public_gateway_patch_model = {} - public_gateway_patch_model['name'] = 'my-public-gateway' + public_gateway_patch_model['name'] = 'my-public-gateway-updated' # Set up parameter values id = 'testString' @@ -37088,7 +37503,7 @@ def test_list_floating_ips_all_params(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:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727' target_name = 'my-resource' target_resource_type = 'testString' @@ -37178,7 +37593,8 @@ 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()} with pytest.raises(ValueError): @@ -37225,7 +37641,7 @@ 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:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727', target_name='my-resource', target_resource_type='testString', ) @@ -37266,7 +37682,7 @@ 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:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727', target_name='my-resource', target_resource_type='testString', ) @@ -37718,7 +38134,7 @@ def test_list_network_acls_all_params(self): """ # Set up mock url = preprocess_url('/network_acls') - mock_response = '{"first": {"href": "href"}, "limit": 20, "network_acls": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "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"}], "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"}}], "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "network_acls": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-network-acl-rule"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-network-acl-rule", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "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"}], "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"}}], "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -37766,7 +38182,7 @@ def test_list_network_acls_required_params(self): """ # Set up mock url = preprocess_url('/network_acls') - mock_response = '{"first": {"href": "href"}, "limit": 20, "network_acls": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "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"}], "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"}}], "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "network_acls": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-network-acl-rule"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-network-acl-rule", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "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"}], "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"}}], "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -37798,7 +38214,7 @@ def test_list_network_acls_value_error(self): """ # Set up mock url = preprocess_url('/network_acls') - mock_response = '{"first": {"href": "href"}, "limit": 20, "network_acls": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "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"}], "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"}}], "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "network_acls": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-network-acl-rule"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-network-acl-rule", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "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"}], "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"}}], "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -37808,7 +38224,8 @@ 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()} with pytest.raises(ValueError): @@ -37830,8 +38247,8 @@ def test_list_network_acls_with_pager_get_next(self): """ # Set up a two-page mock response url = preprocess_url('/network_acls') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"network_acls":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"rules":[{"action":"allow","before":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9","id":"8daca77a-4980-4d33-8f3e-7038797be8f9","name":"my-rule-1"},"created_at":"2019-01-01T12:00:00.000Z","destination":"192.168.3.0/24","direction":"inbound","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9","id":"8daca77a-4980-4d33-8f3e-7038797be8f9","ip_version":"ipv4","name":"my-rule-1","source":"192.168.3.0/24","destination_port_max":22,"destination_port_min":22,"protocol":"udp","source_port_max":65535,"source_port_min":49152}],"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"}],"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"}}],"total_count":2,"limit":1}' - mock_response2 = '{"network_acls":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"rules":[{"action":"allow","before":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9","id":"8daca77a-4980-4d33-8f3e-7038797be8f9","name":"my-rule-1"},"created_at":"2019-01-01T12:00:00.000Z","destination":"192.168.3.0/24","direction":"inbound","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9","id":"8daca77a-4980-4d33-8f3e-7038797be8f9","ip_version":"ipv4","name":"my-rule-1","source":"192.168.3.0/24","destination_port_max":22,"destination_port_min":22,"protocol":"udp","source_port_max":65535,"source_port_min":49152}],"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"}],"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"}}],"total_count":2,"limit":1}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"network_acls":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"rules":[{"action":"allow","before":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9","id":"r006-8daca77a-4980-4d33-8f3e-7038797be8f9","name":"my-network-acl-rule"},"created_at":"2019-01-01T12:00:00.000Z","destination":"192.168.3.0/24","direction":"inbound","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9","id":"r006-8daca77a-4980-4d33-8f3e-7038797be8f9","ip_version":"ipv4","name":"my-network-acl-rule","source":"192.168.3.0/24","destination_port_max":22,"destination_port_min":22,"protocol":"udp","source_port_max":65535,"source_port_min":49152}],"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"}],"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"}}],"total_count":2,"limit":1}' + mock_response2 = '{"network_acls":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"rules":[{"action":"allow","before":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9","id":"r006-8daca77a-4980-4d33-8f3e-7038797be8f9","name":"my-network-acl-rule"},"created_at":"2019-01-01T12:00:00.000Z","destination":"192.168.3.0/24","direction":"inbound","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9","id":"r006-8daca77a-4980-4d33-8f3e-7038797be8f9","ip_version":"ipv4","name":"my-network-acl-rule","source":"192.168.3.0/24","destination_port_max":22,"destination_port_min":22,"protocol":"udp","source_port_max":65535,"source_port_min":49152}],"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"}],"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"}}],"total_count":2,"limit":1}' responses.add( responses.GET, url, @@ -37867,8 +38284,8 @@ def test_list_network_acls_with_pager_get_all(self): """ # Set up a two-page mock response url = preprocess_url('/network_acls') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"network_acls":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"rules":[{"action":"allow","before":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9","id":"8daca77a-4980-4d33-8f3e-7038797be8f9","name":"my-rule-1"},"created_at":"2019-01-01T12:00:00.000Z","destination":"192.168.3.0/24","direction":"inbound","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9","id":"8daca77a-4980-4d33-8f3e-7038797be8f9","ip_version":"ipv4","name":"my-rule-1","source":"192.168.3.0/24","destination_port_max":22,"destination_port_min":22,"protocol":"udp","source_port_max":65535,"source_port_min":49152}],"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"}],"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"}}],"total_count":2,"limit":1}' - mock_response2 = '{"network_acls":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"rules":[{"action":"allow","before":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9","id":"8daca77a-4980-4d33-8f3e-7038797be8f9","name":"my-rule-1"},"created_at":"2019-01-01T12:00:00.000Z","destination":"192.168.3.0/24","direction":"inbound","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9","id":"8daca77a-4980-4d33-8f3e-7038797be8f9","ip_version":"ipv4","name":"my-rule-1","source":"192.168.3.0/24","destination_port_max":22,"destination_port_min":22,"protocol":"udp","source_port_max":65535,"source_port_min":49152}],"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"}],"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"}}],"total_count":2,"limit":1}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"network_acls":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"rules":[{"action":"allow","before":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9","id":"r006-8daca77a-4980-4d33-8f3e-7038797be8f9","name":"my-network-acl-rule"},"created_at":"2019-01-01T12:00:00.000Z","destination":"192.168.3.0/24","direction":"inbound","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9","id":"r006-8daca77a-4980-4d33-8f3e-7038797be8f9","ip_version":"ipv4","name":"my-network-acl-rule","source":"192.168.3.0/24","destination_port_max":22,"destination_port_min":22,"protocol":"udp","source_port_max":65535,"source_port_min":49152}],"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"}],"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"}}],"total_count":2,"limit":1}' + mock_response2 = '{"network_acls":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"rules":[{"action":"allow","before":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9","id":"r006-8daca77a-4980-4d33-8f3e-7038797be8f9","name":"my-network-acl-rule"},"created_at":"2019-01-01T12:00:00.000Z","destination":"192.168.3.0/24","direction":"inbound","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9","id":"r006-8daca77a-4980-4d33-8f3e-7038797be8f9","ip_version":"ipv4","name":"my-network-acl-rule","source":"192.168.3.0/24","destination_port_max":22,"destination_port_min":22,"protocol":"udp","source_port_max":65535,"source_port_min":49152}],"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"}],"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"}}],"total_count":2,"limit":1}' responses.add( responses.GET, url, @@ -37907,7 +38324,7 @@ def test_create_network_acl_all_params(self): """ # Set up mock url = preprocess_url('/network_acls') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "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"}], "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"}}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-network-acl-rule"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-network-acl-rule", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "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"}], "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"}}' responses.add( responses.POST, url, @@ -37922,7 +38339,7 @@ def test_create_network_acl_all_params(self): # Construct a dict representation of a VPCIdentityById model vpc_identity_model = {} - vpc_identity_model['id'] = 'f0aae929-7047-46d1-92e1-9102b07a7f6f' + vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' # Construct a dict representation of a NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype model network_acl_rule_prototype_network_acl_context_model = {} @@ -37930,7 +38347,7 @@ def test_create_network_acl_all_params(self): 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['name'] = 'my-network-acl-rule' 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 @@ -37977,7 +38394,7 @@ def test_create_network_acl_value_error(self): """ # Set up mock url = preprocess_url('/network_acls') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "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"}], "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"}}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-network-acl-rule"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-network-acl-rule", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "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"}], "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"}}' responses.add( responses.POST, url, @@ -37992,7 +38409,7 @@ def test_create_network_acl_value_error(self): # Construct a dict representation of a VPCIdentityById model vpc_identity_model = {} - vpc_identity_model['id'] = 'f0aae929-7047-46d1-92e1-9102b07a7f6f' + vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' # Construct a dict representation of a NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype model network_acl_rule_prototype_network_acl_context_model = {} @@ -38000,7 +38417,7 @@ def test_create_network_acl_value_error(self): 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['name'] = 'my-network-acl-rule' 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 @@ -38124,7 +38541,7 @@ def test_get_network_acl_all_params(self): """ # Set up mock url = preprocess_url('/network_acls/testString') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "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"}], "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"}}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-network-acl-rule"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-network-acl-rule", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "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"}], "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"}}' responses.add( responses.GET, url, @@ -38162,7 +38579,7 @@ def test_get_network_acl_value_error(self): """ # Set up mock url = preprocess_url('/network_acls/testString') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "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"}], "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"}}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-network-acl-rule"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-network-acl-rule", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "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"}], "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"}}' responses.add( responses.GET, url, @@ -38205,7 +38622,7 @@ def test_update_network_acl_all_params(self): """ # Set up mock url = preprocess_url('/network_acls/testString') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "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"}], "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"}}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-network-acl-rule"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-network-acl-rule", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "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"}], "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"}}' responses.add( responses.PATCH, url, @@ -38216,7 +38633,7 @@ def test_update_network_acl_all_params(self): # Construct a dict representation of a NetworkACLPatch model network_acl_patch_model = {} - network_acl_patch_model['name'] = 'my-network-acl' + network_acl_patch_model['name'] = 'my-network-acl-updated' # Set up parameter values id = 'testString' @@ -38252,7 +38669,7 @@ def test_update_network_acl_value_error(self): """ # Set up mock url = preprocess_url('/network_acls/testString') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "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"}], "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"}}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-network-acl-rule"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-network-acl-rule", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "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"}], "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"}}' responses.add( responses.PATCH, url, @@ -38263,7 +38680,7 @@ def test_update_network_acl_value_error(self): # Construct a dict representation of a NetworkACLPatch model network_acl_patch_model = {} - network_acl_patch_model['name'] = 'my-network-acl' + network_acl_patch_model['name'] = 'my-network-acl-updated' # Set up parameter values id = 'testString' @@ -38301,7 +38718,7 @@ def test_list_network_acl_rules_all_params(self): """ # Set up mock url = preprocess_url('/network_acls/testString/rules') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-network-acl-rule"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-network-acl-rule", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "total_count": 132}' responses.add( responses.GET, url, @@ -38351,7 +38768,7 @@ def test_list_network_acl_rules_required_params(self): """ # Set up mock url = preprocess_url('/network_acls/testString/rules') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-network-acl-rule"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-network-acl-rule", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "total_count": 132}' responses.add( responses.GET, url, @@ -38389,7 +38806,7 @@ def test_list_network_acl_rules_value_error(self): """ # Set up mock url = preprocess_url('/network_acls/testString/rules') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "rules": [{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-network-acl-rule"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-network-acl-rule", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}], "total_count": 132}' responses.add( responses.GET, url, @@ -38426,8 +38843,8 @@ def test_list_network_acl_rules_with_pager_get_next(self): """ # Set up a two-page mock response url = preprocess_url('/network_acls/testString/rules') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"rules":[{"action":"allow","before":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9","id":"8daca77a-4980-4d33-8f3e-7038797be8f9","name":"my-rule-1"},"created_at":"2019-01-01T12:00:00.000Z","destination":"192.168.3.0/24","direction":"inbound","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9","id":"8daca77a-4980-4d33-8f3e-7038797be8f9","ip_version":"ipv4","name":"my-rule-1","source":"192.168.3.0/24","destination_port_max":22,"destination_port_min":22,"protocol":"udp","source_port_max":65535,"source_port_min":49152}]}' - mock_response2 = '{"total_count":2,"limit":1,"rules":[{"action":"allow","before":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9","id":"8daca77a-4980-4d33-8f3e-7038797be8f9","name":"my-rule-1"},"created_at":"2019-01-01T12:00:00.000Z","destination":"192.168.3.0/24","direction":"inbound","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9","id":"8daca77a-4980-4d33-8f3e-7038797be8f9","ip_version":"ipv4","name":"my-rule-1","source":"192.168.3.0/24","destination_port_max":22,"destination_port_min":22,"protocol":"udp","source_port_max":65535,"source_port_min":49152}]}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"rules":[{"action":"allow","before":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9","id":"r006-8daca77a-4980-4d33-8f3e-7038797be8f9","name":"my-network-acl-rule"},"created_at":"2019-01-01T12:00:00.000Z","destination":"192.168.3.0/24","direction":"inbound","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9","id":"r006-8daca77a-4980-4d33-8f3e-7038797be8f9","ip_version":"ipv4","name":"my-network-acl-rule","source":"192.168.3.0/24","destination_port_max":22,"destination_port_min":22,"protocol":"udp","source_port_max":65535,"source_port_min":49152}]}' + mock_response2 = '{"total_count":2,"limit":1,"rules":[{"action":"allow","before":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9","id":"r006-8daca77a-4980-4d33-8f3e-7038797be8f9","name":"my-network-acl-rule"},"created_at":"2019-01-01T12:00:00.000Z","destination":"192.168.3.0/24","direction":"inbound","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9","id":"r006-8daca77a-4980-4d33-8f3e-7038797be8f9","ip_version":"ipv4","name":"my-network-acl-rule","source":"192.168.3.0/24","destination_port_max":22,"destination_port_min":22,"protocol":"udp","source_port_max":65535,"source_port_min":49152}]}' responses.add( responses.GET, url, @@ -38464,8 +38881,8 @@ def test_list_network_acl_rules_with_pager_get_all(self): """ # Set up a two-page mock response url = preprocess_url('/network_acls/testString/rules') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"rules":[{"action":"allow","before":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9","id":"8daca77a-4980-4d33-8f3e-7038797be8f9","name":"my-rule-1"},"created_at":"2019-01-01T12:00:00.000Z","destination":"192.168.3.0/24","direction":"inbound","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9","id":"8daca77a-4980-4d33-8f3e-7038797be8f9","ip_version":"ipv4","name":"my-rule-1","source":"192.168.3.0/24","destination_port_max":22,"destination_port_min":22,"protocol":"udp","source_port_max":65535,"source_port_min":49152}]}' - mock_response2 = '{"total_count":2,"limit":1,"rules":[{"action":"allow","before":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9","id":"8daca77a-4980-4d33-8f3e-7038797be8f9","name":"my-rule-1"},"created_at":"2019-01-01T12:00:00.000Z","destination":"192.168.3.0/24","direction":"inbound","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9","id":"8daca77a-4980-4d33-8f3e-7038797be8f9","ip_version":"ipv4","name":"my-rule-1","source":"192.168.3.0/24","destination_port_max":22,"destination_port_min":22,"protocol":"udp","source_port_max":65535,"source_port_min":49152}]}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"rules":[{"action":"allow","before":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9","id":"r006-8daca77a-4980-4d33-8f3e-7038797be8f9","name":"my-network-acl-rule"},"created_at":"2019-01-01T12:00:00.000Z","destination":"192.168.3.0/24","direction":"inbound","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9","id":"r006-8daca77a-4980-4d33-8f3e-7038797be8f9","ip_version":"ipv4","name":"my-network-acl-rule","source":"192.168.3.0/24","destination_port_max":22,"destination_port_min":22,"protocol":"udp","source_port_max":65535,"source_port_min":49152}]}' + mock_response2 = '{"total_count":2,"limit":1,"rules":[{"action":"allow","before":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9","id":"r006-8daca77a-4980-4d33-8f3e-7038797be8f9","name":"my-network-acl-rule"},"created_at":"2019-01-01T12:00:00.000Z","destination":"192.168.3.0/24","direction":"inbound","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9","id":"r006-8daca77a-4980-4d33-8f3e-7038797be8f9","ip_version":"ipv4","name":"my-network-acl-rule","source":"192.168.3.0/24","destination_port_max":22,"destination_port_min":22,"protocol":"udp","source_port_max":65535,"source_port_min":49152}]}' responses.add( responses.GET, url, @@ -38505,7 +38922,7 @@ def test_create_network_acl_rule_all_params(self): """ # Set up mock url = preprocess_url('/network_acls/testString/rules') - mock_response = '{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}' + mock_response = '{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-network-acl-rule"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-network-acl-rule", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}' responses.add( responses.POST, url, @@ -38516,7 +38933,7 @@ 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'] = 'r006-8daca77a-4980-4d33-8f3e-7038797be8f9' # Construct a dict representation of a NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype model network_acl_rule_prototype_model = {} @@ -38525,7 +38942,7 @@ def test_create_network_acl_rule_all_params(self): 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' - network_acl_rule_prototype_model['name'] = 'my-rule-2' + network_acl_rule_prototype_model['name'] = 'my-network-acl-rule' network_acl_rule_prototype_model['source'] = '192.168.3.2/32' network_acl_rule_prototype_model['destination_port_max'] = 22 network_acl_rule_prototype_model['destination_port_min'] = 22 @@ -38567,7 +38984,7 @@ def test_create_network_acl_rule_value_error(self): """ # Set up mock url = preprocess_url('/network_acls/testString/rules') - mock_response = '{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}' + mock_response = '{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-network-acl-rule"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-network-acl-rule", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}' responses.add( responses.POST, url, @@ -38578,7 +38995,7 @@ 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'] = 'r006-8daca77a-4980-4d33-8f3e-7038797be8f9' # Construct a dict representation of a NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype model network_acl_rule_prototype_model = {} @@ -38587,7 +39004,7 @@ def test_create_network_acl_rule_value_error(self): 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' - network_acl_rule_prototype_model['name'] = 'my-rule-2' + network_acl_rule_prototype_model['name'] = 'my-network-acl-rule' network_acl_rule_prototype_model['source'] = '192.168.3.2/32' network_acl_rule_prototype_model['destination_port_max'] = 22 network_acl_rule_prototype_model['destination_port_min'] = 22 @@ -38710,7 +39127,7 @@ def test_get_network_acl_rule_all_params(self): """ # Set up mock url = preprocess_url('/network_acls/testString/rules/testString') - mock_response = '{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}' + mock_response = '{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-network-acl-rule"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-network-acl-rule", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}' responses.add( responses.GET, url, @@ -38750,7 +39167,7 @@ def test_get_network_acl_rule_value_error(self): """ # Set up mock url = preprocess_url('/network_acls/testString/rules/testString') - mock_response = '{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}' + mock_response = '{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-network-acl-rule"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-network-acl-rule", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}' responses.add( responses.GET, url, @@ -38795,7 +39212,7 @@ def test_update_network_acl_rule_all_params(self): """ # Set up mock url = preprocess_url('/network_acls/testString/rules/testString') - mock_response = '{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}' + mock_response = '{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-network-acl-rule"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-network-acl-rule", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}' responses.add( responses.PATCH, url, @@ -38806,7 +39223,7 @@ 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'] = 'r006-8daca77a-4980-4d33-8f3e-7038797be8f9' # Construct a dict representation of a NetworkACLRulePatch model network_acl_rule_patch_model = {} @@ -38817,9 +39234,8 @@ def test_update_network_acl_rule_all_params(self): network_acl_rule_patch_model['destination_port_max'] = 22 network_acl_rule_patch_model['destination_port_min'] = 22 network_acl_rule_patch_model['direction'] = 'inbound' - network_acl_rule_patch_model['name'] = 'my-rule-1' - network_acl_rule_patch_model['protocol'] = 'tcp' - network_acl_rule_patch_model['source'] = '192.168.3.2/32' + network_acl_rule_patch_model['name'] = 'my-network-acl-rule' + network_acl_rule_patch_model['source'] = '10.0.0.0/0' network_acl_rule_patch_model['source_port_max'] = 65535 network_acl_rule_patch_model['source_port_min'] = 49152 network_acl_rule_patch_model['type'] = 8 @@ -38860,7 +39276,7 @@ def test_update_network_acl_rule_value_error(self): """ # Set up mock url = preprocess_url('/network_acls/testString/rules/testString') - mock_response = '{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-1", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}' + mock_response = '{"action": "allow", "before": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-network-acl-rule"}, "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "r006-8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-network-acl-rule", "source": "192.168.3.0/24", "destination_port_max": 22, "destination_port_min": 22, "protocol": "udp", "source_port_max": 65535, "source_port_min": 49152}' responses.add( responses.PATCH, url, @@ -38871,7 +39287,7 @@ 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'] = 'r006-8daca77a-4980-4d33-8f3e-7038797be8f9' # Construct a dict representation of a NetworkACLRulePatch model network_acl_rule_patch_model = {} @@ -38882,9 +39298,8 @@ def test_update_network_acl_rule_value_error(self): network_acl_rule_patch_model['destination_port_max'] = 22 network_acl_rule_patch_model['destination_port_min'] = 22 network_acl_rule_patch_model['direction'] = 'inbound' - network_acl_rule_patch_model['name'] = 'my-rule-1' - network_acl_rule_patch_model['protocol'] = 'tcp' - network_acl_rule_patch_model['source'] = '192.168.3.2/32' + network_acl_rule_patch_model['name'] = 'my-network-acl-rule' + network_acl_rule_patch_model['source'] = '10.0.0.0/0' network_acl_rule_patch_model['source_port_max'] = 65535 network_acl_rule_patch_model['source_port_min'] = 49152 network_acl_rule_patch_model['type'] = 8 @@ -39083,7 +39498,8 @@ 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()} with pytest.raises(ValueError): @@ -40671,7 +41087,8 @@ 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()} with pytest.raises(ValueError): @@ -41435,7 +41852,8 @@ 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()} with pytest.raises(ValueError): @@ -42201,7 +42619,8 @@ 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()} with pytest.raises(ValueError): @@ -42904,15 +43323,11 @@ def test_create_vpn_gateway_connection_all_params(self): # 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['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 @@ -42993,15 +43408,11 @@ def test_create_vpn_gateway_connection_value_error(self): # 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['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 @@ -44191,7 +44602,8 @@ 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()} with pytest.raises(ValueError): @@ -44305,9 +44717,7 @@ 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 = {} @@ -44316,9 +44726,7 @@ def test_create_vpn_server_all_params(self): # 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 = {} @@ -44412,9 +44820,7 @@ 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 = {} @@ -44423,9 +44829,7 @@ def test_create_vpn_server_value_error(self): # 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 = {} @@ -44695,9 +45099,7 @@ 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 = {} @@ -44706,9 +45108,7 @@ def test_update_vpn_server_all_params(self): # 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 = {} @@ -44778,9 +45178,7 @@ 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 = {} @@ -44789,9 +45187,7 @@ def test_update_vpn_server_required_params(self): # 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 = {} @@ -44859,9 +45255,7 @@ 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 = {} @@ -44870,9 +45264,7 @@ def test_update_vpn_server_value_error(self): # 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 = {} @@ -46080,7 +46472,7 @@ def test_list_load_balancer_profiles_all_params(self): """ # Set up mock url = preprocess_url('/load_balancer/profiles') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "profiles": [{"access_modes": {"type": "enum", "values": ["private"]}, "availability": {"type": "fixed", "value": "region"}, "family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "instance_groups_supported": {"type": "fixed", "value": true}, "logging_supported": {"type": "fixed", "value": ["datapath"]}, "name": "network-fixed", "route_mode_supported": {"type": "fixed", "value": true}, "security_groups_supported": {"type": "fixed", "value": true}, "source_ip_session_persistence_supported": {"type": "fixed", "value": true}, "udp_supported": {"type": "fixed", "value": true}}], "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "profiles": [{"access_modes": {"type": "enum", "values": ["private"]}, "availability": {"type": "fixed", "value": "region"}, "family": "application", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "instance_groups_supported": {"type": "fixed", "value": true}, "logging_supported": {"type": "fixed", "value": ["datapath"]}, "name": "network-fixed", "route_mode_supported": {"type": "fixed", "value": true}, "security_groups_supported": {"type": "fixed", "value": true}, "source_ip_session_persistence_supported": {"type": "fixed", "value": true}, "udp_supported": {"type": "fixed", "value": true}}], "total_count": 132}' responses.add( responses.GET, url, @@ -46125,7 +46517,7 @@ def test_list_load_balancer_profiles_required_params(self): """ # Set up mock url = preprocess_url('/load_balancer/profiles') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "profiles": [{"access_modes": {"type": "enum", "values": ["private"]}, "availability": {"type": "fixed", "value": "region"}, "family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "instance_groups_supported": {"type": "fixed", "value": true}, "logging_supported": {"type": "fixed", "value": ["datapath"]}, "name": "network-fixed", "route_mode_supported": {"type": "fixed", "value": true}, "security_groups_supported": {"type": "fixed", "value": true}, "source_ip_session_persistence_supported": {"type": "fixed", "value": true}, "udp_supported": {"type": "fixed", "value": true}}], "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "profiles": [{"access_modes": {"type": "enum", "values": ["private"]}, "availability": {"type": "fixed", "value": "region"}, "family": "application", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "instance_groups_supported": {"type": "fixed", "value": true}, "logging_supported": {"type": "fixed", "value": ["datapath"]}, "name": "network-fixed", "route_mode_supported": {"type": "fixed", "value": true}, "security_groups_supported": {"type": "fixed", "value": true}, "source_ip_session_persistence_supported": {"type": "fixed", "value": true}, "udp_supported": {"type": "fixed", "value": true}}], "total_count": 132}' responses.add( responses.GET, url, @@ -46157,7 +46549,7 @@ def test_list_load_balancer_profiles_value_error(self): """ # Set up mock url = preprocess_url('/load_balancer/profiles') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "profiles": [{"access_modes": {"type": "enum", "values": ["private"]}, "availability": {"type": "fixed", "value": "region"}, "family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "instance_groups_supported": {"type": "fixed", "value": true}, "logging_supported": {"type": "fixed", "value": ["datapath"]}, "name": "network-fixed", "route_mode_supported": {"type": "fixed", "value": true}, "security_groups_supported": {"type": "fixed", "value": true}, "source_ip_session_persistence_supported": {"type": "fixed", "value": true}, "udp_supported": {"type": "fixed", "value": true}}], "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "profiles": [{"access_modes": {"type": "enum", "values": ["private"]}, "availability": {"type": "fixed", "value": "region"}, "family": "application", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "instance_groups_supported": {"type": "fixed", "value": true}, "logging_supported": {"type": "fixed", "value": ["datapath"]}, "name": "network-fixed", "route_mode_supported": {"type": "fixed", "value": true}, "security_groups_supported": {"type": "fixed", "value": true}, "source_ip_session_persistence_supported": {"type": "fixed", "value": true}, "udp_supported": {"type": "fixed", "value": true}}], "total_count": 132}' responses.add( responses.GET, url, @@ -46167,7 +46559,8 @@ 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()} with pytest.raises(ValueError): @@ -46189,8 +46582,8 @@ def test_list_load_balancer_profiles_with_pager_get_next(self): """ # Set up a two-page mock response url = preprocess_url('/load_balancer/profiles') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"profiles":[{"access_modes":{"type":"enum","values":["private"]},"availability":{"type":"fixed","value":"region"},"family":"network","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed","instance_groups_supported":{"type":"fixed","value":true},"logging_supported":{"type":"fixed","value":["datapath"]},"name":"network-fixed","route_mode_supported":{"type":"fixed","value":true},"security_groups_supported":{"type":"fixed","value":true},"source_ip_session_persistence_supported":{"type":"fixed","value":true},"udp_supported":{"type":"fixed","value":true}}]}' - mock_response2 = '{"total_count":2,"limit":1,"profiles":[{"access_modes":{"type":"enum","values":["private"]},"availability":{"type":"fixed","value":"region"},"family":"network","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed","instance_groups_supported":{"type":"fixed","value":true},"logging_supported":{"type":"fixed","value":["datapath"]},"name":"network-fixed","route_mode_supported":{"type":"fixed","value":true},"security_groups_supported":{"type":"fixed","value":true},"source_ip_session_persistence_supported":{"type":"fixed","value":true},"udp_supported":{"type":"fixed","value":true}}]}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"profiles":[{"access_modes":{"type":"enum","values":["private"]},"availability":{"type":"fixed","value":"region"},"family":"application","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed","instance_groups_supported":{"type":"fixed","value":true},"logging_supported":{"type":"fixed","value":["datapath"]},"name":"network-fixed","route_mode_supported":{"type":"fixed","value":true},"security_groups_supported":{"type":"fixed","value":true},"source_ip_session_persistence_supported":{"type":"fixed","value":true},"udp_supported":{"type":"fixed","value":true}}]}' + mock_response2 = '{"total_count":2,"limit":1,"profiles":[{"access_modes":{"type":"enum","values":["private"]},"availability":{"type":"fixed","value":"region"},"family":"application","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed","instance_groups_supported":{"type":"fixed","value":true},"logging_supported":{"type":"fixed","value":["datapath"]},"name":"network-fixed","route_mode_supported":{"type":"fixed","value":true},"security_groups_supported":{"type":"fixed","value":true},"source_ip_session_persistence_supported":{"type":"fixed","value":true},"udp_supported":{"type":"fixed","value":true}}]}' responses.add( responses.GET, url, @@ -46225,8 +46618,8 @@ def test_list_load_balancer_profiles_with_pager_get_all(self): """ # Set up a two-page mock response url = preprocess_url('/load_balancer/profiles') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"profiles":[{"access_modes":{"type":"enum","values":["private"]},"availability":{"type":"fixed","value":"region"},"family":"network","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed","instance_groups_supported":{"type":"fixed","value":true},"logging_supported":{"type":"fixed","value":["datapath"]},"name":"network-fixed","route_mode_supported":{"type":"fixed","value":true},"security_groups_supported":{"type":"fixed","value":true},"source_ip_session_persistence_supported":{"type":"fixed","value":true},"udp_supported":{"type":"fixed","value":true}}]}' - mock_response2 = '{"total_count":2,"limit":1,"profiles":[{"access_modes":{"type":"enum","values":["private"]},"availability":{"type":"fixed","value":"region"},"family":"network","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed","instance_groups_supported":{"type":"fixed","value":true},"logging_supported":{"type":"fixed","value":["datapath"]},"name":"network-fixed","route_mode_supported":{"type":"fixed","value":true},"security_groups_supported":{"type":"fixed","value":true},"source_ip_session_persistence_supported":{"type":"fixed","value":true},"udp_supported":{"type":"fixed","value":true}}]}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"profiles":[{"access_modes":{"type":"enum","values":["private"]},"availability":{"type":"fixed","value":"region"},"family":"application","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed","instance_groups_supported":{"type":"fixed","value":true},"logging_supported":{"type":"fixed","value":["datapath"]},"name":"network-fixed","route_mode_supported":{"type":"fixed","value":true},"security_groups_supported":{"type":"fixed","value":true},"source_ip_session_persistence_supported":{"type":"fixed","value":true},"udp_supported":{"type":"fixed","value":true}}]}' + mock_response2 = '{"total_count":2,"limit":1,"profiles":[{"access_modes":{"type":"enum","values":["private"]},"availability":{"type":"fixed","value":"region"},"family":"application","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed","instance_groups_supported":{"type":"fixed","value":true},"logging_supported":{"type":"fixed","value":["datapath"]},"name":"network-fixed","route_mode_supported":{"type":"fixed","value":true},"security_groups_supported":{"type":"fixed","value":true},"source_ip_session_persistence_supported":{"type":"fixed","value":true},"udp_supported":{"type":"fixed","value":true}}]}' responses.add( responses.GET, url, @@ -46264,7 +46657,7 @@ def test_get_load_balancer_profile_all_params(self): """ # Set up mock url = preprocess_url('/load_balancer/profiles/network-fixed') - mock_response = '{"access_modes": {"type": "enum", "values": ["private"]}, "availability": {"type": "fixed", "value": "region"}, "family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "instance_groups_supported": {"type": "fixed", "value": true}, "logging_supported": {"type": "fixed", "value": ["datapath"]}, "name": "network-fixed", "route_mode_supported": {"type": "fixed", "value": true}, "security_groups_supported": {"type": "fixed", "value": true}, "source_ip_session_persistence_supported": {"type": "fixed", "value": true}, "udp_supported": {"type": "fixed", "value": true}}' + mock_response = '{"access_modes": {"type": "enum", "values": ["private"]}, "availability": {"type": "fixed", "value": "region"}, "family": "application", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "instance_groups_supported": {"type": "fixed", "value": true}, "logging_supported": {"type": "fixed", "value": ["datapath"]}, "name": "network-fixed", "route_mode_supported": {"type": "fixed", "value": true}, "security_groups_supported": {"type": "fixed", "value": true}, "source_ip_session_persistence_supported": {"type": "fixed", "value": true}, "udp_supported": {"type": "fixed", "value": true}}' responses.add( responses.GET, url, @@ -46302,7 +46695,7 @@ def test_get_load_balancer_profile_value_error(self): """ # Set up mock url = preprocess_url('/load_balancer/profiles/network-fixed') - mock_response = '{"access_modes": {"type": "enum", "values": ["private"]}, "availability": {"type": "fixed", "value": "region"}, "family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "instance_groups_supported": {"type": "fixed", "value": true}, "logging_supported": {"type": "fixed", "value": ["datapath"]}, "name": "network-fixed", "route_mode_supported": {"type": "fixed", "value": true}, "security_groups_supported": {"type": "fixed", "value": true}, "source_ip_session_persistence_supported": {"type": "fixed", "value": true}, "udp_supported": {"type": "fixed", "value": true}}' + mock_response = '{"access_modes": {"type": "enum", "values": ["private"]}, "availability": {"type": "fixed", "value": "region"}, "family": "application", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "instance_groups_supported": {"type": "fixed", "value": true}, "logging_supported": {"type": "fixed", "value": ["datapath"]}, "name": "network-fixed", "route_mode_supported": {"type": "fixed", "value": true}, "security_groups_supported": {"type": "fixed", "value": true}, "source_ip_session_persistence_supported": {"type": "fixed", "value": true}, "udp_supported": {"type": "fixed", "value": true}}' responses.add( responses.GET, url, @@ -46345,7 +46738,7 @@ def test_list_load_balancers_all_params(self): """ # Set up mock url = preprocess_url('/load_balancers') - mock_response = '{"first": {"href": "href"}, "limit": 20, "load_balancers": [{"access_mode": "private", "availability": "region", "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": true, "is_private_path": true, "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, "source_ip_session_persistence_supported": true, "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": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "load_balancers": [{"access_mode": "private", "availability": "region", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": true, "is_private_path": true, "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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "id": "r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091"}], "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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-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": "application", "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, "source_ip_session_persistence_supported": true, "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": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -46390,7 +46783,7 @@ def test_list_load_balancers_required_params(self): """ # Set up mock url = preprocess_url('/load_balancers') - mock_response = '{"first": {"href": "href"}, "limit": 20, "load_balancers": [{"access_mode": "private", "availability": "region", "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": true, "is_private_path": true, "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, "source_ip_session_persistence_supported": true, "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": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "load_balancers": [{"access_mode": "private", "availability": "region", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": true, "is_private_path": true, "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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "id": "r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091"}], "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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-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": "application", "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, "source_ip_session_persistence_supported": true, "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": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -46422,7 +46815,7 @@ def test_list_load_balancers_value_error(self): """ # Set up mock url = preprocess_url('/load_balancers') - mock_response = '{"first": {"href": "href"}, "limit": 20, "load_balancers": [{"access_mode": "private", "availability": "region", "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": true, "is_private_path": true, "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, "source_ip_session_persistence_supported": true, "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": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "load_balancers": [{"access_mode": "private", "availability": "region", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": true, "is_private_path": true, "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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "id": "r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091"}], "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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-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": "application", "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, "source_ip_session_persistence_supported": true, "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": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -46432,7 +46825,8 @@ 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()} with pytest.raises(ValueError): @@ -46454,8 +46848,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":[{"access_mode":"private","availability":"region","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":true,"is_private_path":true,"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,"source_ip_session_persistence_supported":true,"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":[{"access_mode":"private","availability":"region","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":true,"is_private_path":true,"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,"source_ip_session_persistence_supported":true,"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":[{"access_mode":"private","availability":"region","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727","instance_groups_supported":true,"is_private_path":true,"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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091","id":"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091"}],"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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004","id":"r006-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":"application","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,"source_ip_session_persistence_supported":true,"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":[{"access_mode":"private","availability":"region","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727","instance_groups_supported":true,"is_private_path":true,"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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091","id":"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091"}],"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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004","id":"r006-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":"application","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,"source_ip_session_persistence_supported":true,"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, @@ -46490,8 +46884,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":[{"access_mode":"private","availability":"region","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":true,"is_private_path":true,"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,"source_ip_session_persistence_supported":true,"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":[{"access_mode":"private","availability":"region","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":true,"is_private_path":true,"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,"source_ip_session_persistence_supported":true,"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":[{"access_mode":"private","availability":"region","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727","instance_groups_supported":true,"is_private_path":true,"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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091","id":"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091"}],"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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004","id":"r006-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":"application","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,"source_ip_session_persistence_supported":true,"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":[{"access_mode":"private","availability":"region","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727","instance_groups_supported":true,"is_private_path":true,"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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091","id":"r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091"}],"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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004","id":"r006-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":"application","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,"source_ip_session_persistence_supported":true,"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, @@ -46529,7 +46923,7 @@ def test_create_load_balancer_all_params(self): """ # Set up mock url = preprocess_url('/load_balancers') - mock_response = '{"access_mode": "private", "availability": "region", "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": true, "is_private_path": true, "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, "source_ip_session_persistence_supported": true, "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 = '{"access_mode": "private", "availability": "region", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": true, "is_private_path": true, "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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "id": "r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091"}], "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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-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": "application", "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, "source_ip_session_persistence_supported": true, "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, @@ -46544,9 +46938,7 @@ def test_create_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/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::' - ) + 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 = {} @@ -46559,9 +46951,7 @@ def test_create_load_balancer_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 LoadBalancerPoolIdentityByName model load_balancer_pool_identity_by_name_model = {} @@ -46569,7 +46959,7 @@ def test_create_load_balancer_all_params(self): # 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'] = 'r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' # Construct a dict representation of a LoadBalancerListenerHTTPSRedirectPrototype model load_balancer_listener_https_redirect_prototype_model = {} @@ -46580,16 +46970,10 @@ def test_create_load_balancer_all_params(self): # 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['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['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 @@ -46636,9 +47020,7 @@ def test_create_load_balancer_all_params(self): 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 = {} @@ -46717,7 +47099,7 @@ def test_create_load_balancer_value_error(self): """ # Set up mock url = preprocess_url('/load_balancers') - mock_response = '{"access_mode": "private", "availability": "region", "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": true, "is_private_path": true, "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, "source_ip_session_persistence_supported": true, "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 = '{"access_mode": "private", "availability": "region", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": true, "is_private_path": true, "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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "id": "r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091"}], "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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-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": "application", "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, "source_ip_session_persistence_supported": true, "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, @@ -46732,9 +47114,7 @@ def test_create_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/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::' - ) + 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 = {} @@ -46747,9 +47127,7 @@ def test_create_load_balancer_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 LoadBalancerPoolIdentityByName model load_balancer_pool_identity_by_name_model = {} @@ -46757,7 +47135,7 @@ def test_create_load_balancer_value_error(self): # 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'] = 'r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' # Construct a dict representation of a LoadBalancerListenerHTTPSRedirectPrototype model load_balancer_listener_https_redirect_prototype_model = {} @@ -46768,16 +47146,10 @@ def test_create_load_balancer_value_error(self): # 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['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['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 @@ -46824,9 +47196,7 @@ def test_create_load_balancer_value_error(self): 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 = {} @@ -46998,7 +47368,7 @@ def test_get_load_balancer_all_params(self): """ # Set up mock url = preprocess_url('/load_balancers/testString') - mock_response = '{"access_mode": "private", "availability": "region", "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": true, "is_private_path": true, "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, "source_ip_session_persistence_supported": true, "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 = '{"access_mode": "private", "availability": "region", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": true, "is_private_path": true, "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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "id": "r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091"}], "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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-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": "application", "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, "source_ip_session_persistence_supported": true, "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, @@ -47036,7 +47406,7 @@ def test_get_load_balancer_value_error(self): """ # Set up mock url = preprocess_url('/load_balancers/testString') - mock_response = '{"access_mode": "private", "availability": "region", "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": true, "is_private_path": true, "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, "source_ip_session_persistence_supported": true, "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 = '{"access_mode": "private", "availability": "region", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": true, "is_private_path": true, "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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "id": "r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091"}], "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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-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": "application", "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, "source_ip_session_persistence_supported": true, "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, @@ -47079,7 +47449,7 @@ def test_update_load_balancer_all_params(self): """ # Set up mock url = preprocess_url('/load_balancers/testString') - mock_response = '{"access_mode": "private", "availability": "region", "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": true, "is_private_path": true, "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, "source_ip_session_persistence_supported": true, "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 = '{"access_mode": "private", "availability": "region", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": true, "is_private_path": true, "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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "id": "r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091"}], "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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-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": "application", "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, "source_ip_session_persistence_supported": true, "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, @@ -47090,9 +47460,7 @@ 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/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::' - ) + 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 = {} @@ -47158,7 +47526,7 @@ def test_update_load_balancer_required_params(self): """ # Set up mock url = preprocess_url('/load_balancers/testString') - mock_response = '{"access_mode": "private", "availability": "region", "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": true, "is_private_path": true, "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, "source_ip_session_persistence_supported": true, "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 = '{"access_mode": "private", "availability": "region", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": true, "is_private_path": true, "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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "id": "r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091"}], "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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-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": "application", "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, "source_ip_session_persistence_supported": true, "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, @@ -47169,9 +47537,7 @@ 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/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::' - ) + 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 = {} @@ -47235,7 +47601,7 @@ def test_update_load_balancer_value_error(self): """ # Set up mock url = preprocess_url('/load_balancers/testString') - mock_response = '{"access_mode": "private", "availability": "region", "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": true, "is_private_path": true, "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, "source_ip_session_persistence_supported": true, "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 = '{"access_mode": "private", "availability": "region", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "instance_groups_supported": true, "is_private_path": true, "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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "id": "r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091"}], "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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-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": "application", "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, "source_ip_session_persistence_supported": true, "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, @@ -47246,9 +47612,7 @@ 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/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::' - ) + 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 = {} @@ -47395,7 +47759,7 @@ def test_list_load_balancer_listeners_all_params(self): """ # Set up mock url = preprocess_url('/load_balancers/testString/listeners') - mock_response = '{"listeners": [{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"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"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "https_redirect": {"http_status_code": 301, "listener": {"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"}, "uri": "/example?doc=get"}, "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "idle_connection_timeout": 100, "policies": [{"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", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}]}' + mock_response = '{"listeners": [{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "https_redirect": {"http_status_code": 301, "listener": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "id": "r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091"}, "uri": "/example?doc=get"}, "id": "r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "idle_connection_timeout": 100, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "id": "r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "name": "my-load-balancer-listener-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}]}' responses.add( responses.GET, url, @@ -47433,7 +47797,7 @@ def test_list_load_balancer_listeners_value_error(self): """ # Set up mock url = preprocess_url('/load_balancers/testString/listeners') - mock_response = '{"listeners": [{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"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"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "https_redirect": {"http_status_code": 301, "listener": {"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"}, "uri": "/example?doc=get"}, "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "idle_connection_timeout": 100, "policies": [{"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", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}]}' + mock_response = '{"listeners": [{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "https_redirect": {"http_status_code": 301, "listener": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "id": "r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091"}, "uri": "/example?doc=get"}, "id": "r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "idle_connection_timeout": 100, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "id": "r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "name": "my-load-balancer-listener-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}]}' responses.add( responses.GET, url, @@ -47476,7 +47840,7 @@ def test_create_load_balancer_listener_all_params(self): """ # Set up mock url = preprocess_url('/load_balancers/testString/listeners') - mock_response = '{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"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"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "https_redirect": {"http_status_code": 301, "listener": {"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"}, "uri": "/example?doc=get"}, "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "idle_connection_timeout": 100, "policies": [{"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", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}' + mock_response = '{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "https_redirect": {"http_status_code": 301, "listener": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "id": "r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091"}, "uri": "/example?doc=get"}, "id": "r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "idle_connection_timeout": 100, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "id": "r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "name": "my-load-balancer-listener-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}' responses.add( responses.POST, url, @@ -47487,17 +47851,15 @@ 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'] = 'r006-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'] = 'r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' # Construct a dict representation of a LoadBalancerListenerHTTPSRedirectPrototype model load_balancer_listener_https_redirect_prototype_model = {} @@ -47514,12 +47876,12 @@ def test_create_load_balancer_listener_all_params(self): # 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'] = 'r006-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['name'] = 'my-load-balancer-listener-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 @@ -47588,7 +47950,7 @@ def test_create_load_balancer_listener_value_error(self): """ # Set up mock url = preprocess_url('/load_balancers/testString/listeners') - mock_response = '{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"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"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "https_redirect": {"http_status_code": 301, "listener": {"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"}, "uri": "/example?doc=get"}, "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "idle_connection_timeout": 100, "policies": [{"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", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}' + mock_response = '{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "https_redirect": {"http_status_code": 301, "listener": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "id": "r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091"}, "uri": "/example?doc=get"}, "id": "r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "idle_connection_timeout": 100, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "id": "r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "name": "my-load-balancer-listener-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}' responses.add( responses.POST, url, @@ -47599,17 +47961,15 @@ 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'] = 'r006-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'] = 'r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' # Construct a dict representation of a LoadBalancerListenerHTTPSRedirectPrototype model load_balancer_listener_https_redirect_prototype_model = {} @@ -47626,12 +47986,12 @@ def test_create_load_balancer_listener_value_error(self): # 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'] = 'r006-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['name'] = 'my-load-balancer-listener-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 @@ -47761,7 +48121,7 @@ def test_get_load_balancer_listener_all_params(self): """ # Set up mock url = preprocess_url('/load_balancers/testString/listeners/testString') - mock_response = '{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"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"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "https_redirect": {"http_status_code": 301, "listener": {"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"}, "uri": "/example?doc=get"}, "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "idle_connection_timeout": 100, "policies": [{"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", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}' + mock_response = '{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "https_redirect": {"http_status_code": 301, "listener": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "id": "r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091"}, "uri": "/example?doc=get"}, "id": "r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "idle_connection_timeout": 100, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "id": "r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "name": "my-load-balancer-listener-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}' responses.add( responses.GET, url, @@ -47801,7 +48161,7 @@ def test_get_load_balancer_listener_value_error(self): """ # Set up mock url = preprocess_url('/load_balancers/testString/listeners/testString') - mock_response = '{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"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"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "https_redirect": {"http_status_code": 301, "listener": {"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"}, "uri": "/example?doc=get"}, "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "idle_connection_timeout": 100, "policies": [{"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", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}' + mock_response = '{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "https_redirect": {"http_status_code": 301, "listener": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "id": "r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091"}, "uri": "/example?doc=get"}, "id": "r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "idle_connection_timeout": 100, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "id": "r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "name": "my-load-balancer-listener-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}' responses.add( responses.GET, url, @@ -47846,7 +48206,7 @@ def test_update_load_balancer_listener_all_params(self): """ # Set up mock url = preprocess_url('/load_balancers/testString/listeners/testString') - mock_response = '{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"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"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "https_redirect": {"http_status_code": 301, "listener": {"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"}, "uri": "/example?doc=get"}, "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "idle_connection_timeout": 100, "policies": [{"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", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}' + mock_response = '{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "https_redirect": {"http_status_code": 301, "listener": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "id": "r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091"}, "uri": "/example?doc=get"}, "id": "r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "idle_connection_timeout": 100, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "id": "r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "name": "my-load-balancer-listener-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}' responses.add( responses.PATCH, url, @@ -47857,17 +48217,15 @@ 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'] = 'r006-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'] = 'r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' # Construct a dict representation of a LoadBalancerListenerHTTPSRedirectPatch model load_balancer_listener_https_redirect_patch_model = {} @@ -47924,7 +48282,7 @@ def test_update_load_balancer_listener_value_error(self): """ # Set up mock url = preprocess_url('/load_balancers/testString/listeners/testString') - mock_response = '{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"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"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "https_redirect": {"http_status_code": 301, "listener": {"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"}, "uri": "/example?doc=get"}, "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "idle_connection_timeout": 100, "policies": [{"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", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}' + mock_response = '{"accept_proxy_protocol": true, "certificate_instance": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "connection_limit": 2000, "created_at": "2019-01-01T12:00:00.000Z", "default_pool": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "https_redirect": {"http_status_code": 301, "listener": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "id": "r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091"}, "uri": "/example?doc=get"}, "id": "r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091", "idle_connection_timeout": 100, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "id": "r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "name": "my-load-balancer-listener-policy"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}' responses.add( responses.PATCH, url, @@ -47935,17 +48293,15 @@ 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'] = 'r006-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'] = 'r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' # Construct a dict representation of a LoadBalancerListenerHTTPSRedirectPatch model load_balancer_listener_https_redirect_patch_model = {} @@ -48004,7 +48360,7 @@ def test_list_load_balancer_listener_policies_all_params(self): """ # Set up mock 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"}}]}' + mock_response = '{"policies": [{"action": "forward", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "id": "r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "name": "my-load-balancer-listener-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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b", "id": "r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b"}], "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}}]}' responses.add( responses.GET, url, @@ -48044,7 +48400,7 @@ def test_list_load_balancer_listener_policies_value_error(self): """ # Set up mock 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"}}]}' + mock_response = '{"policies": [{"action": "forward", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "id": "r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "name": "my-load-balancer-listener-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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b", "id": "r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b"}], "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}}]}' responses.add( responses.GET, url, @@ -48089,7 +48445,7 @@ def test_create_load_balancer_listener_policy_all_params(self): """ # Set up mock 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"}}' + mock_response = '{"action": "forward", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "id": "r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "name": "my-load-balancer-listener-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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b", "id": "r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b"}], "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}}' responses.add( responses.POST, url, @@ -48107,14 +48463,14 @@ def test_create_load_balancer_listener_policy_all_params(self): # 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'] = 'r006-70294e14-4e61-11e8-bcf4-0242ac110004' # Set up parameter values load_balancer_id = 'testString' listener_id = 'testString' action = 'forward' priority = 5 - name = 'my-policy' + name = 'my-load-balancer-listener-policy' rules = [load_balancer_listener_policy_rule_prototype_model] target = load_balancer_listener_policy_target_prototype_model @@ -48137,7 +48493,7 @@ def test_create_load_balancer_listener_policy_all_params(self): req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) assert req_body['action'] == 'forward' assert req_body['priority'] == 5 - assert req_body['name'] == 'my-policy' + assert req_body['name'] == 'my-load-balancer-listener-policy' assert req_body['rules'] == [load_balancer_listener_policy_rule_prototype_model] assert req_body['target'] == load_balancer_listener_policy_target_prototype_model @@ -48157,7 +48513,7 @@ def test_create_load_balancer_listener_policy_value_error(self): """ # Set up mock 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"}}' + mock_response = '{"action": "forward", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "id": "r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "name": "my-load-balancer-listener-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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b", "id": "r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b"}], "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}}' responses.add( responses.POST, url, @@ -48175,14 +48531,14 @@ def test_create_load_balancer_listener_policy_value_error(self): # 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'] = 'r006-70294e14-4e61-11e8-bcf4-0242ac110004' # Set up parameter values load_balancer_id = 'testString' listener_id = 'testString' action = 'forward' priority = 5 - name = 'my-policy' + name = 'my-load-balancer-listener-policy' rules = [load_balancer_listener_policy_rule_prototype_model] target = load_balancer_listener_policy_target_prototype_model @@ -48303,7 +48659,7 @@ def test_get_load_balancer_listener_policy_all_params(self): """ # Set up mock 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"}}' + mock_response = '{"action": "forward", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "id": "r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "name": "my-load-balancer-listener-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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b", "id": "r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b"}], "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}}' responses.add( responses.GET, url, @@ -48345,7 +48701,7 @@ def test_get_load_balancer_listener_policy_value_error(self): """ # Set up mock 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"}}' + mock_response = '{"action": "forward", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "id": "r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "name": "my-load-balancer-listener-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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b", "id": "r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b"}], "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}}' responses.add( responses.GET, url, @@ -48392,7 +48748,7 @@ def test_update_load_balancer_listener_policy_all_params(self): """ # Set up mock 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"}}' + mock_response = '{"action": "forward", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "id": "r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "name": "my-load-balancer-listener-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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b", "id": "r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b"}], "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}}' responses.add( responses.PATCH, url, @@ -48403,11 +48759,11 @@ 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'] = 'r006-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['name'] = 'my-load-balancer-listener-policy-updated' load_balancer_listener_policy_patch_model['priority'] = 5 load_balancer_listener_policy_patch_model['target'] = load_balancer_listener_policy_target_patch_model @@ -48449,7 +48805,7 @@ def test_update_load_balancer_listener_policy_value_error(self): """ # Set up mock 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"}}' + mock_response = '{"action": "forward", "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "id": "r006-0b00a37f-a3d7-43ca-8187-f1e88d659245", "name": "my-load-balancer-listener-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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b", "id": "r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b"}], "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}}' responses.add( responses.PATCH, url, @@ -48460,11 +48816,11 @@ 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'] = 'r006-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['name'] = 'my-load-balancer-listener-policy-updated' load_balancer_listener_policy_patch_model['priority'] = 5 load_balancer_listener_policy_patch_model['target'] = load_balancer_listener_policy_target_patch_model @@ -48508,7 +48864,7 @@ def test_list_load_balancer_listener_policy_rules_all_params(self): """ # Set up mock 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"}]}' + 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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b", "id": "r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b", "provisioning_status": "active", "type": "body", "value": "value"}]}' responses.add( responses.GET, url, @@ -48550,7 +48906,7 @@ def test_list_load_balancer_listener_policy_rules_value_error(self): """ # Set up mock 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"}]}' + 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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b", "id": "r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b", "provisioning_status": "active", "type": "body", "value": "value"}]}' responses.add( responses.GET, url, @@ -48597,7 +48953,7 @@ def test_create_load_balancer_listener_policy_rule_all_params(self): """ # Set up mock 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"}' + 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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b", "id": "r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b", "provisioning_status": "active", "type": "body", "value": "value"}' responses.add( responses.POST, url, @@ -48653,7 +49009,7 @@ def test_create_load_balancer_listener_policy_rule_value_error(self): """ # Set up mock 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"}' + 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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b", "id": "r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b", "provisioning_status": "active", "type": "body", "value": "value"}' responses.add( responses.POST, url, @@ -48794,7 +49150,7 @@ def test_get_load_balancer_listener_policy_rule_all_params(self): """ # Set up mock 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"}' + 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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b", "id": "r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b", "provisioning_status": "active", "type": "body", "value": "value"}' responses.add( responses.GET, url, @@ -48838,7 +49194,7 @@ def test_get_load_balancer_listener_policy_rule_value_error(self): """ # Set up mock 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"}' + 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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b", "id": "r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b", "provisioning_status": "active", "type": "body", "value": "value"}' responses.add( responses.GET, url, @@ -48887,7 +49243,7 @@ def test_update_load_balancer_listener_policy_rule_all_params(self): """ # Set up mock 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"}' + 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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b", "id": "r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b", "provisioning_status": "active", "type": "body", "value": "value"}' responses.add( responses.PATCH, url, @@ -48901,7 +49257,7 @@ def test_update_load_balancer_listener_policy_rule_all_params(self): 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['type'] = 'body' - load_balancer_listener_policy_rule_patch_model['value'] = 'testString' + load_balancer_listener_policy_rule_patch_model['value'] = 'my-example-hostname-updated' # Set up parameter values load_balancer_id = 'testString' @@ -48943,7 +49299,7 @@ def test_update_load_balancer_listener_policy_rule_value_error(self): """ # Set up mock 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"}' + 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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b", "id": "r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b", "provisioning_status": "active", "type": "body", "value": "value"}' responses.add( responses.PATCH, url, @@ -48957,7 +49313,7 @@ def test_update_load_balancer_listener_policy_rule_value_error(self): 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['type'] = 'body' - load_balancer_listener_policy_rule_patch_model['value'] = 'testString' + load_balancer_listener_policy_rule_patch_model['value'] = 'my-example-hostname-updated' # Set up parameter values load_balancer_id = 'testString' @@ -49001,7 +49357,7 @@ def test_list_load_balancer_pools_all_params(self): """ # Set up mock url = preprocess_url('/load_balancers/testString/pools') - mock_response = '{"pools": [{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "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", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group: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_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group"}, "members": [{"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"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}]}' + mock_response = '{"pools": [{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "id": "r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "name": "my-instance-group"}, "members": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "id": "r006-4a4b345f-cf6b-4326-8202-6d8229e9833a"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}]}' responses.add( responses.GET, url, @@ -49039,7 +49395,7 @@ def test_list_load_balancer_pools_value_error(self): """ # Set up mock url = preprocess_url('/load_balancers/testString/pools') - mock_response = '{"pools": [{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "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", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group: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_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group"}, "members": [{"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"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}]}' + mock_response = '{"pools": [{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "id": "r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "name": "my-instance-group"}, "members": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "id": "r006-4a4b345f-cf6b-4326-8202-6d8229e9833a"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}]}' responses.add( responses.GET, url, @@ -49082,7 +49438,7 @@ def test_create_load_balancer_pool_all_params(self): """ # Set up mock url = preprocess_url('/load_balancers/testString/pools') - mock_response = '{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "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", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group: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_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group"}, "members": [{"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"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}' + mock_response = '{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "id": "r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "name": "my-instance-group"}, "members": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "id": "r006-4a4b345f-cf6b-4326-8202-6d8229e9833a"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}' responses.add( responses.POST, url, @@ -49167,7 +49523,7 @@ def test_create_load_balancer_pool_value_error(self): """ # Set up mock url = preprocess_url('/load_balancers/testString/pools') - mock_response = '{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "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", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group: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_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group"}, "members": [{"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"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}' + mock_response = '{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "id": "r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "name": "my-instance-group"}, "members": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "id": "r006-4a4b345f-cf6b-4326-8202-6d8229e9833a"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}' responses.add( responses.POST, url, @@ -49323,7 +49679,7 @@ def test_get_load_balancer_pool_all_params(self): """ # Set up mock url = preprocess_url('/load_balancers/testString/pools/testString') - mock_response = '{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "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", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group: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_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group"}, "members": [{"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"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}' + mock_response = '{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "id": "r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "name": "my-instance-group"}, "members": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "id": "r006-4a4b345f-cf6b-4326-8202-6d8229e9833a"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}' responses.add( responses.GET, url, @@ -49363,7 +49719,7 @@ def test_get_load_balancer_pool_value_error(self): """ # Set up mock url = preprocess_url('/load_balancers/testString/pools/testString') - mock_response = '{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "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", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group: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_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group"}, "members": [{"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"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}' + mock_response = '{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "id": "r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "name": "my-instance-group"}, "members": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "id": "r006-4a4b345f-cf6b-4326-8202-6d8229e9833a"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}' responses.add( responses.GET, url, @@ -49408,7 +49764,7 @@ def test_update_load_balancer_pool_all_params(self): """ # Set up mock url = preprocess_url('/load_balancers/testString/pools/testString') - mock_response = '{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "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", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group: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_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group"}, "members": [{"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"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}' + mock_response = '{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "id": "r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "name": "my-instance-group"}, "members": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "id": "r006-4a4b345f-cf6b-4326-8202-6d8229e9833a"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}' responses.add( responses.PATCH, url, @@ -49433,7 +49789,7 @@ def test_update_load_balancer_pool_all_params(self): # 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['algorithm'] = 'weighted_round_robin' 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' @@ -49476,7 +49832,7 @@ def test_update_load_balancer_pool_value_error(self): """ # Set up mock url = preprocess_url('/load_balancers/testString/pools/testString') - mock_response = '{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "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", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group: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_groups/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group"}, "members": [{"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"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}' + mock_response = '{"algorithm": "least_connections", "created_at": "2019-01-01T12:00:00.000Z", "health_monitor": {"delay": 5, "max_retries": 2, "port": 22, "timeout": 2, "type": "http", "url_path": "/"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004", "id": "r006-70294e14-4e61-11e8-bcf4-0242ac110004", "instance_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "id": "r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", "name": "my-instance-group"}, "members": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "id": "r006-4a4b345f-cf6b-4326-8202-6d8229e9833a"}], "name": "my-load-balancer-pool", "protocol": "http", "provisioning_status": "active", "proxy_protocol": "disabled", "session_persistence": {"cookie_name": "my-cookie-name", "type": "app_cookie"}}' responses.add( responses.PATCH, url, @@ -49501,7 +49857,7 @@ def test_update_load_balancer_pool_value_error(self): # 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['algorithm'] = 'weighted_round_robin' 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' @@ -49546,7 +49902,7 @@ def test_list_load_balancer_pool_members_all_params(self): """ # Set up mock 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "name": "my-instance"}, "weight": 50}]}' + mock_response = '{"members": [{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "id": "r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "name": "my-instance"}, "weight": 50}]}' responses.add( responses.GET, url, @@ -49586,7 +49942,7 @@ def test_list_load_balancer_pool_members_value_error(self): """ # Set up mock 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "name": "my-instance"}, "weight": 50}]}' + mock_response = '{"members": [{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "id": "r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "name": "my-instance"}, "weight": 50}]}' responses.add( responses.GET, url, @@ -49631,7 +49987,7 @@ def test_create_load_balancer_pool_member_all_params(self): """ # Set up mock 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "name": "my-instance"}, "weight": 50}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "id": "r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "name": "my-instance"}, "weight": 50}' responses.add( responses.POST, url, @@ -49686,7 +50042,7 @@ def test_create_load_balancer_pool_member_value_error(self): """ # Set up mock 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "name": "my-instance"}, "weight": 50}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "id": "r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "name": "my-instance"}, "weight": 50}' responses.add( responses.POST, url, @@ -49740,7 +50096,7 @@ def test_replace_load_balancer_pool_members_all_params(self): """ # Set up mock 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "name": "my-instance"}, "weight": 50}]}' + mock_response = '{"members": [{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "id": "r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "name": "my-instance"}, "weight": 50}]}' responses.add( responses.PUT, url, @@ -49795,7 +50151,7 @@ def test_replace_load_balancer_pool_members_value_error(self): """ # Set up mock 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "name": "my-instance"}, "weight": 50}]}' + mock_response = '{"members": [{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "id": "r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "name": "my-instance"}, "weight": 50}]}' responses.add( responses.PUT, url, @@ -49935,7 +50291,7 @@ def test_get_load_balancer_pool_member_all_params(self): """ # Set up mock 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "name": "my-instance"}, "weight": 50}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "id": "r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "name": "my-instance"}, "weight": 50}' responses.add( responses.GET, url, @@ -49977,7 +50333,7 @@ def test_get_load_balancer_pool_member_value_error(self): """ # Set up mock 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "name": "my-instance"}, "weight": 50}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "id": "r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "name": "my-instance"}, "weight": 50}' responses.add( responses.GET, url, @@ -50024,7 +50380,7 @@ def test_update_load_balancer_pool_member_all_params(self): """ # Set up mock 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "name": "my-instance"}, "weight": 50}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "id": "r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "name": "my-instance"}, "weight": 50}' responses.add( responses.PATCH, url, @@ -50041,7 +50397,7 @@ def test_update_load_balancer_pool_member_all_params(self): 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['weight'] = 50 + load_balancer_pool_member_patch_model['weight'] = 99 # Set up parameter values load_balancer_id = 'testString' @@ -50081,7 +50437,7 @@ def test_update_load_balancer_pool_member_value_error(self): """ # Set up mock 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "name": "my-instance"}, "weight": 50}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "health": "faulted", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "id": "r006-4a4b345f-cf6b-4326-8202-6d8229e9833a", "port": 80, "provisioning_status": "active", "target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "id": "0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0", "name": "my-instance"}, "weight": 50}' responses.add( responses.PATCH, url, @@ -50098,7 +50454,7 @@ def test_update_load_balancer_pool_member_value_error(self): 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['weight'] = 50 + load_balancer_pool_member_patch_model['weight'] = 99 # Set up parameter values load_balancer_id = 'testString' @@ -50197,7 +50553,7 @@ def test_list_endpoint_gateways_all_params(self): """ # Set up mock url = preprocess_url('/endpoint_gateways') - mock_response = '{"endpoint_gateways": [{"allow_dns_resolution_binding": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "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_reasons": [{"code": "dns_resolution_binding_pending", "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-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "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"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213", "id": "r134-fb880975-db45-4459-8548-64e3995ac213", "name": "my-private-path-service-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": "private_path_service_gateway"}, "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"}}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"endpoint_gateways": [{"allow_dns_resolution_binding": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "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_reasons": [{"code": "dns_resolution_binding_pending", "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-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "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"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5", "id": "r006-7268d425-59b7-48fd-9735-81a7271657d5", "name": "my-private-path-service-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": "private_path_service_gateway"}, "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"}}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -50245,10 +50601,7 @@ 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. @@ -50266,7 +50619,7 @@ def test_list_endpoint_gateways_required_params(self): """ # Set up mock url = preprocess_url('/endpoint_gateways') - mock_response = '{"endpoint_gateways": [{"allow_dns_resolution_binding": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "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_reasons": [{"code": "dns_resolution_binding_pending", "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-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "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"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213", "id": "r134-fb880975-db45-4459-8548-64e3995ac213", "name": "my-private-path-service-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": "private_path_service_gateway"}, "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"}}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"endpoint_gateways": [{"allow_dns_resolution_binding": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "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_reasons": [{"code": "dns_resolution_binding_pending", "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-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "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"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5", "id": "r006-7268d425-59b7-48fd-9735-81a7271657d5", "name": "my-private-path-service-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": "private_path_service_gateway"}, "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"}}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -50298,7 +50651,7 @@ def test_list_endpoint_gateways_value_error(self): """ # Set up mock url = preprocess_url('/endpoint_gateways') - mock_response = '{"endpoint_gateways": [{"allow_dns_resolution_binding": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "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_reasons": [{"code": "dns_resolution_binding_pending", "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-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "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"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213", "id": "r134-fb880975-db45-4459-8548-64e3995ac213", "name": "my-private-path-service-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": "private_path_service_gateway"}, "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"}}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"endpoint_gateways": [{"allow_dns_resolution_binding": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "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_reasons": [{"code": "dns_resolution_binding_pending", "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-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "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"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5", "id": "r006-7268d425-59b7-48fd-9735-81a7271657d5", "name": "my-private-path-service-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": "private_path_service_gateway"}, "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"}}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -50308,7 +50661,8 @@ 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()} with pytest.raises(ValueError): @@ -50330,8 +50684,8 @@ def test_list_endpoint_gateways_with_pager_get_next(self): """ # Set up a two-page mock response url = preprocess_url('/endpoint_gateways') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"endpoint_gateways":[{"allow_dns_resolution_binding":true,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","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_reasons":[{"code":"dns_resolution_binding_pending","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-endpoint-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"endpoint_gateway","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"}],"service_endpoint":"my-cloudant-instance.appdomain.cloud","service_endpoints":["my-cloudant-instance.appdomain.cloud"],"target":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213","id":"r134-fb880975-db45-4459-8548-64e3995ac213","name":"my-private-path-service-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":"private_path_service_gateway"},"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"}}],"total_count":2,"limit":1}' - mock_response2 = '{"endpoint_gateways":[{"allow_dns_resolution_binding":true,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","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_reasons":[{"code":"dns_resolution_binding_pending","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-endpoint-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"endpoint_gateway","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"}],"service_endpoint":"my-cloudant-instance.appdomain.cloud","service_endpoints":["my-cloudant-instance.appdomain.cloud"],"target":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213","id":"r134-fb880975-db45-4459-8548-64e3995ac213","name":"my-private-path-service-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":"private_path_service_gateway"},"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"}}],"total_count":2,"limit":1}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"endpoint_gateways":[{"allow_dns_resolution_binding":true,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","id":"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","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_reasons":[{"code":"dns_resolution_binding_pending","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-endpoint-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"endpoint_gateway","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"}],"service_endpoint":"my-cloudant-instance.appdomain.cloud","service_endpoints":["my-cloudant-instance.appdomain.cloud"],"target":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5","id":"r006-7268d425-59b7-48fd-9735-81a7271657d5","name":"my-private-path-service-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":"private_path_service_gateway"},"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"}}],"total_count":2,"limit":1}' + mock_response2 = '{"endpoint_gateways":[{"allow_dns_resolution_binding":true,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","id":"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","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_reasons":[{"code":"dns_resolution_binding_pending","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-endpoint-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"endpoint_gateway","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"}],"service_endpoint":"my-cloudant-instance.appdomain.cloud","service_endpoints":["my-cloudant-instance.appdomain.cloud"],"target":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5","id":"r006-7268d425-59b7-48fd-9735-81a7271657d5","name":"my-private-path-service-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":"private_path_service_gateway"},"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"}}],"total_count":2,"limit":1}' responses.add( responses.GET, url, @@ -50373,8 +50727,8 @@ def test_list_endpoint_gateways_with_pager_get_all(self): """ # Set up a two-page mock response url = preprocess_url('/endpoint_gateways') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"endpoint_gateways":[{"allow_dns_resolution_binding":true,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","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_reasons":[{"code":"dns_resolution_binding_pending","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-endpoint-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"endpoint_gateway","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"}],"service_endpoint":"my-cloudant-instance.appdomain.cloud","service_endpoints":["my-cloudant-instance.appdomain.cloud"],"target":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213","id":"r134-fb880975-db45-4459-8548-64e3995ac213","name":"my-private-path-service-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":"private_path_service_gateway"},"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"}}],"total_count":2,"limit":1}' - mock_response2 = '{"endpoint_gateways":[{"allow_dns_resolution_binding":true,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","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_reasons":[{"code":"dns_resolution_binding_pending","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-endpoint-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"endpoint_gateway","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"}],"service_endpoint":"my-cloudant-instance.appdomain.cloud","service_endpoints":["my-cloudant-instance.appdomain.cloud"],"target":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213","id":"r134-fb880975-db45-4459-8548-64e3995ac213","name":"my-private-path-service-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":"private_path_service_gateway"},"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"}}],"total_count":2,"limit":1}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"endpoint_gateways":[{"allow_dns_resolution_binding":true,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","id":"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","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_reasons":[{"code":"dns_resolution_binding_pending","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-endpoint-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"endpoint_gateway","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"}],"service_endpoint":"my-cloudant-instance.appdomain.cloud","service_endpoints":["my-cloudant-instance.appdomain.cloud"],"target":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5","id":"r006-7268d425-59b7-48fd-9735-81a7271657d5","name":"my-private-path-service-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":"private_path_service_gateway"},"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"}}],"total_count":2,"limit":1}' + mock_response2 = '{"endpoint_gateways":[{"allow_dns_resolution_binding":true,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","health_state":"ok","href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","id":"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","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_reasons":[{"code":"dns_resolution_binding_pending","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-endpoint-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"endpoint_gateway","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"}],"service_endpoint":"my-cloudant-instance.appdomain.cloud","service_endpoints":["my-cloudant-instance.appdomain.cloud"],"target":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5","id":"r006-7268d425-59b7-48fd-9735-81a7271657d5","name":"my-private-path-service-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":"private_path_service_gateway"},"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"}}],"total_count":2,"limit":1}' responses.add( responses.GET, url, @@ -50419,7 +50773,7 @@ def test_create_endpoint_gateway_all_params(self): """ # Set up mock url = preprocess_url('/endpoint_gateways') - mock_response = '{"allow_dns_resolution_binding": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "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_reasons": [{"code": "dns_resolution_binding_pending", "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-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "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"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213", "id": "r134-fb880975-db45-4459-8548-64e3995ac213", "name": "my-private-path-service-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": "private_path_service_gateway"}, "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"}}' + mock_response = '{"allow_dns_resolution_binding": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "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_reasons": [{"code": "dns_resolution_binding_pending", "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-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "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"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5", "id": "r006-7268d425-59b7-48fd-9735-81a7271657d5", "name": "my-private-path-service-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": "private_path_service_gateway"}, "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"}}' responses.add( responses.POST, url, @@ -50435,7 +50789,7 @@ def test_create_endpoint_gateway_all_params(self): # Construct a dict representation of a VPCIdentityById model vpc_identity_model = {} - vpc_identity_model['id'] = 'f025b503-ae66-46de-a011-3bd08fd5f7bf' + vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' # Construct a dict representation of a EndpointGatewayReservedIPReservedIPIdentityById model endpoint_gateway_reserved_ip_model = {} @@ -50499,7 +50853,7 @@ def test_create_endpoint_gateway_value_error(self): """ # Set up mock url = preprocess_url('/endpoint_gateways') - mock_response = '{"allow_dns_resolution_binding": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "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_reasons": [{"code": "dns_resolution_binding_pending", "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-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "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"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213", "id": "r134-fb880975-db45-4459-8548-64e3995ac213", "name": "my-private-path-service-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": "private_path_service_gateway"}, "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"}}' + mock_response = '{"allow_dns_resolution_binding": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "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_reasons": [{"code": "dns_resolution_binding_pending", "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-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "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"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5", "id": "r006-7268d425-59b7-48fd-9735-81a7271657d5", "name": "my-private-path-service-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": "private_path_service_gateway"}, "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"}}' responses.add( responses.POST, url, @@ -50515,7 +50869,7 @@ def test_create_endpoint_gateway_value_error(self): # Construct a dict representation of a VPCIdentityById model vpc_identity_model = {} - vpc_identity_model['id'] = 'f025b503-ae66-46de-a011-3bd08fd5f7bf' + vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' # Construct a dict representation of a EndpointGatewayReservedIPReservedIPIdentityById model endpoint_gateway_reserved_ip_model = {} @@ -50570,7 +50924,7 @@ def test_list_endpoint_gateway_ips_all_params(self): """ # Set up mock url = preprocess_url('/endpoint_gateways/testString/ips') - mock_response = '{"first": {"href": "href"}, "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": "provider", "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": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "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": "provider", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -50620,7 +50974,7 @@ def test_list_endpoint_gateway_ips_required_params(self): """ # Set up mock url = preprocess_url('/endpoint_gateways/testString/ips') - mock_response = '{"first": {"href": "href"}, "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": "provider", "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": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "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": "provider", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -50658,7 +51012,7 @@ def test_list_endpoint_gateway_ips_value_error(self): """ # Set up mock url = preprocess_url('/endpoint_gateways/testString/ips') - mock_response = '{"first": {"href": "href"}, "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": "provider", "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": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "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": "provider", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -50695,8 +51049,8 @@ def test_list_endpoint_gateway_ips_with_pager_get_next(self): """ # Set up a two-page mock response url = preprocess_url('/endpoint_gateways/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":"provider","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":"provider","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_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":"provider","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","id":"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","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":"provider","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","id":"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","name":"my-endpoint-gateway","resource_type":"endpoint_gateway"}}]}' responses.add( responses.GET, url, @@ -50733,8 +51087,8 @@ def test_list_endpoint_gateway_ips_with_pager_get_all(self): """ # Set up a two-page mock response url = preprocess_url('/endpoint_gateways/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":"provider","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":"provider","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_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":"provider","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","id":"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","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":"provider","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","id":"r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0","name":"my-endpoint-gateway","resource_type":"endpoint_gateway"}}]}' responses.add( responses.GET, url, @@ -50853,7 +51207,7 @@ def test_get_endpoint_gateway_ip_all_params(self): """ # Set up mock url = preprocess_url('/endpoint_gateways/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": "provider", "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_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": "provider", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}' responses.add( responses.GET, url, @@ -50893,7 +51247,7 @@ def test_get_endpoint_gateway_ip_value_error(self): """ # Set up mock url = preprocess_url('/endpoint_gateways/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": "provider", "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_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": "provider", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}' responses.add( responses.GET, url, @@ -50938,7 +51292,7 @@ def test_add_endpoint_gateway_ip_all_params(self): """ # Set up mock url = preprocess_url('/endpoint_gateways/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": "provider", "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_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": "provider", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}' responses.add( responses.PUT, url, @@ -50978,7 +51332,7 @@ def test_add_endpoint_gateway_ip_value_error(self): """ # Set up mock url = preprocess_url('/endpoint_gateways/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": "provider", "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_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": "provider", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}' responses.add( responses.PUT, url, @@ -51098,7 +51452,7 @@ def test_get_endpoint_gateway_all_params(self): """ # Set up mock url = preprocess_url('/endpoint_gateways/testString') - mock_response = '{"allow_dns_resolution_binding": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "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_reasons": [{"code": "dns_resolution_binding_pending", "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-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "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"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213", "id": "r134-fb880975-db45-4459-8548-64e3995ac213", "name": "my-private-path-service-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": "private_path_service_gateway"}, "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"}}' + mock_response = '{"allow_dns_resolution_binding": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "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_reasons": [{"code": "dns_resolution_binding_pending", "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-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "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"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5", "id": "r006-7268d425-59b7-48fd-9735-81a7271657d5", "name": "my-private-path-service-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": "private_path_service_gateway"}, "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"}}' responses.add( responses.GET, url, @@ -51136,7 +51490,7 @@ def test_get_endpoint_gateway_value_error(self): """ # Set up mock url = preprocess_url('/endpoint_gateways/testString') - mock_response = '{"allow_dns_resolution_binding": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "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_reasons": [{"code": "dns_resolution_binding_pending", "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-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "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"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213", "id": "r134-fb880975-db45-4459-8548-64e3995ac213", "name": "my-private-path-service-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": "private_path_service_gateway"}, "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"}}' + mock_response = '{"allow_dns_resolution_binding": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "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_reasons": [{"code": "dns_resolution_binding_pending", "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-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "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"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5", "id": "r006-7268d425-59b7-48fd-9735-81a7271657d5", "name": "my-private-path-service-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": "private_path_service_gateway"}, "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"}}' responses.add( responses.GET, url, @@ -51179,7 +51533,7 @@ def test_update_endpoint_gateway_all_params(self): """ # Set up mock url = preprocess_url('/endpoint_gateways/testString') - mock_response = '{"allow_dns_resolution_binding": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "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_reasons": [{"code": "dns_resolution_binding_pending", "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-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "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"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213", "id": "r134-fb880975-db45-4459-8548-64e3995ac213", "name": "my-private-path-service-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": "private_path_service_gateway"}, "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"}}' + mock_response = '{"allow_dns_resolution_binding": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "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_reasons": [{"code": "dns_resolution_binding_pending", "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-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "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"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5", "id": "r006-7268d425-59b7-48fd-9735-81a7271657d5", "name": "my-private-path-service-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": "private_path_service_gateway"}, "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"}}' responses.add( responses.PATCH, url, @@ -51190,7 +51544,7 @@ def test_update_endpoint_gateway_all_params(self): # Construct a dict representation of a EndpointGatewayPatch model endpoint_gateway_patch_model = {} - endpoint_gateway_patch_model['allow_dns_resolution_binding'] = True + endpoint_gateway_patch_model['allow_dns_resolution_binding'] = False endpoint_gateway_patch_model['name'] = 'my-endpoint-gateway' # Set up parameter values @@ -51227,7 +51581,7 @@ def test_update_endpoint_gateway_value_error(self): """ # Set up mock url = preprocess_url('/endpoint_gateways/testString') - mock_response = '{"allow_dns_resolution_binding": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "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_reasons": [{"code": "dns_resolution_binding_pending", "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-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "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"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213", "id": "r134-fb880975-db45-4459-8548-64e3995ac213", "name": "my-private-path-service-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": "private_path_service_gateway"}, "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"}}' + mock_response = '{"allow_dns_resolution_binding": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "health_state": "ok", "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "id": "r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0", "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_reasons": [{"code": "dns_resolution_binding_pending", "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-endpoint-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "endpoint_gateway", "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"}], "service_endpoint": "my-cloudant-instance.appdomain.cloud", "service_endpoints": ["my-cloudant-instance.appdomain.cloud"], "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5", "id": "r006-7268d425-59b7-48fd-9735-81a7271657d5", "name": "my-private-path-service-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": "private_path_service_gateway"}, "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"}}' responses.add( responses.PATCH, url, @@ -51238,7 +51592,7 @@ def test_update_endpoint_gateway_value_error(self): # Construct a dict representation of a EndpointGatewayPatch model endpoint_gateway_patch_model = {} - endpoint_gateway_patch_model['allow_dns_resolution_binding'] = True + endpoint_gateway_patch_model['allow_dns_resolution_binding'] = False endpoint_gateway_patch_model['name'] = 'my-endpoint-gateway' # Set up parameter values @@ -51334,7 +51688,7 @@ def test_list_flow_log_collectors_all_params(self): """ # Set up mock url = preprocess_url('/flow_log_collectors') - mock_response = '{"first": {"href": "href"}, "flow_log_collectors": [{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "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"}}], "limit": 20, "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "flow_log_collectors": [{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80", "id": "r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "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"}}], "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -51400,7 +51754,7 @@ def test_list_flow_log_collectors_required_params(self): """ # Set up mock url = preprocess_url('/flow_log_collectors') - mock_response = '{"first": {"href": "href"}, "flow_log_collectors": [{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "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"}}], "limit": 20, "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "flow_log_collectors": [{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80", "id": "r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "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"}}], "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -51432,7 +51786,7 @@ def test_list_flow_log_collectors_value_error(self): """ # Set up mock url = preprocess_url('/flow_log_collectors') - mock_response = '{"first": {"href": "href"}, "flow_log_collectors": [{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "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"}}], "limit": 20, "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "flow_log_collectors": [{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80", "id": "r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "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"}}], "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -51442,7 +51796,8 @@ 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()} with pytest.raises(ValueError): @@ -51464,8 +51819,8 @@ def test_list_flow_log_collectors_with_pager_get_next(self): """ # Set up a two-page mock response url = preprocess_url('/flow_log_collectors') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"flow_log_collectors":[{"active":true,"auto_delete":true,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689","href":"https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","lifecycle_state":"stable","name":"my-flow-log-collector","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"storage_bucket":{"name":"bucket-27200-lwx4cfvcue"},"target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-interface","resource_type":"network_interface"},"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"}}]}' - mock_response2 = '{"total_count":2,"limit":1,"flow_log_collectors":[{"active":true,"auto_delete":true,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689","href":"https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","lifecycle_state":"stable","name":"my-flow-log-collector","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"storage_bucket":{"name":"bucket-27200-lwx4cfvcue"},"target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-interface","resource_type":"network_interface"},"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"}}]}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"flow_log_collectors":[{"active":true,"auto_delete":true,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80","href":"https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80","id":"r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80","lifecycle_state":"stable","name":"my-flow-log-collector","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"storage_bucket":{"name":"bucket-27200-lwx4cfvcue"},"target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-interface","resource_type":"network_interface"},"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"}}]}' + mock_response2 = '{"total_count":2,"limit":1,"flow_log_collectors":[{"active":true,"auto_delete":true,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80","href":"https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80","id":"r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80","lifecycle_state":"stable","name":"my-flow-log-collector","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"storage_bucket":{"name":"bucket-27200-lwx4cfvcue"},"target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-interface","resource_type":"network_interface"},"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"}}]}' responses.add( responses.GET, url, @@ -51507,8 +51862,8 @@ def test_list_flow_log_collectors_with_pager_get_all(self): """ # Set up a two-page mock response url = preprocess_url('/flow_log_collectors') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"flow_log_collectors":[{"active":true,"auto_delete":true,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689","href":"https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","lifecycle_state":"stable","name":"my-flow-log-collector","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"storage_bucket":{"name":"bucket-27200-lwx4cfvcue"},"target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-interface","resource_type":"network_interface"},"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"}}]}' - mock_response2 = '{"total_count":2,"limit":1,"flow_log_collectors":[{"active":true,"auto_delete":true,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689","href":"https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","lifecycle_state":"stable","name":"my-flow-log-collector","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"storage_bucket":{"name":"bucket-27200-lwx4cfvcue"},"target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-interface","resource_type":"network_interface"},"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"}}]}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"flow_log_collectors":[{"active":true,"auto_delete":true,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80","href":"https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80","id":"r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80","lifecycle_state":"stable","name":"my-flow-log-collector","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"storage_bucket":{"name":"bucket-27200-lwx4cfvcue"},"target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-interface","resource_type":"network_interface"},"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"}}]}' + mock_response2 = '{"total_count":2,"limit":1,"flow_log_collectors":[{"active":true,"auto_delete":true,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80","href":"https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80","id":"r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80","lifecycle_state":"stable","name":"my-flow-log-collector","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"storage_bucket":{"name":"bucket-27200-lwx4cfvcue"},"target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7","id":"0717-d54eb633-98ea-459d-aa00-6a8e780175a7","name":"my-instance-network-interface","resource_type":"network_interface"},"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"}}]}' responses.add( responses.GET, url, @@ -51553,7 +51908,7 @@ def test_create_flow_log_collector_all_params(self): """ # Set up mock url = preprocess_url('/flow_log_collectors') - mock_response = '{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "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"}}' + mock_response = '{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80", "id": "r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "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"}}' responses.add( responses.POST, url, @@ -51618,7 +51973,7 @@ def test_create_flow_log_collector_value_error(self): """ # Set up mock url = preprocess_url('/flow_log_collectors') - mock_response = '{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "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"}}' + mock_response = '{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80", "id": "r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "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"}}' responses.add( responses.POST, url, @@ -51753,7 +52108,7 @@ def test_get_flow_log_collector_all_params(self): """ # Set up mock url = preprocess_url('/flow_log_collectors/testString') - mock_response = '{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "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"}}' + mock_response = '{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80", "id": "r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "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"}}' responses.add( responses.GET, url, @@ -51791,7 +52146,7 @@ def test_get_flow_log_collector_value_error(self): """ # Set up mock url = preprocess_url('/flow_log_collectors/testString') - mock_response = '{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "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"}}' + mock_response = '{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80", "id": "r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "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"}}' responses.add( responses.GET, url, @@ -51834,7 +52189,7 @@ def test_update_flow_log_collector_all_params(self): """ # Set up mock url = preprocess_url('/flow_log_collectors/testString') - mock_response = '{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "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"}}' + mock_response = '{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80", "id": "r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "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"}}' responses.add( responses.PATCH, url, @@ -51845,7 +52200,7 @@ def test_update_flow_log_collector_all_params(self): # Construct a dict representation of a FlowLogCollectorPatch model flow_log_collector_patch_model = {} - flow_log_collector_patch_model['active'] = True + flow_log_collector_patch_model['active'] = False flow_log_collector_patch_model['name'] = 'my-flow-log-collector' # Set up parameter values @@ -51882,7 +52237,7 @@ def test_update_flow_log_collector_value_error(self): """ # Set up mock url = preprocess_url('/flow_log_collectors/testString') - mock_response = '{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "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"}}' + mock_response = '{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80", "id": "r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "id": "0717-d54eb633-98ea-459d-aa00-6a8e780175a7", "name": "my-instance-network-interface", "resource_type": "network_interface"}, "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"}}' responses.add( responses.PATCH, url, @@ -51893,7 +52248,7 @@ def test_update_flow_log_collector_value_error(self): # Construct a dict representation of a FlowLogCollectorPatch model flow_log_collector_patch_model = {} - flow_log_collector_patch_model['active'] = True + flow_log_collector_patch_model['active'] = False flow_log_collector_patch_model['name'] = 'my-flow-log-collector' # Set up parameter values @@ -51989,7 +52344,7 @@ def test_list_private_path_service_gateways_all_params(self): """ # Set up mock url = preprocess_url('/private_path_service_gateways') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "private_path_service_gateways": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213", "default_access_policy": "deny", "endpoint_gateway_binding_auto_delete": true, "endpoint_gateway_binding_auto_delete_timeout": 1, "endpoint_gateway_count": 0, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213", "id": "r134-fb880975-db45-4459-8548-64e3995ac213", "lifecycle_state": "stable", "load_balancer": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "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", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "name": "my-load-balancer", "resource_type": "load_balancer"}, "name": "my-private-path-service-gateway", "published": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "private_path_service_gateway", "service_endpoints": ["*.example.com"], "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"}, "zonal_affinity": true}], "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "private_path_service_gateways": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5", "default_access_policy": "deny", "endpoint_gateway_binding_auto_delete": true, "endpoint_gateway_binding_auto_delete_timeout": 1, "endpoint_gateway_count": 0, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5", "id": "r006-7268d425-59b7-48fd-9735-81a7271657d5", "lifecycle_state": "stable", "load_balancer": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "name": "my-load-balancer", "resource_type": "load_balancer"}, "name": "my-private-path-service-gateway", "published": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "private_path_service_gateway", "service_endpoints": ["*.example.com"], "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"}, "zonal_affinity": true}], "total_count": 132}' responses.add( responses.GET, url, @@ -52037,7 +52392,7 @@ def test_list_private_path_service_gateways_required_params(self): """ # Set up mock url = preprocess_url('/private_path_service_gateways') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "private_path_service_gateways": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213", "default_access_policy": "deny", "endpoint_gateway_binding_auto_delete": true, "endpoint_gateway_binding_auto_delete_timeout": 1, "endpoint_gateway_count": 0, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213", "id": "r134-fb880975-db45-4459-8548-64e3995ac213", "lifecycle_state": "stable", "load_balancer": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "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", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "name": "my-load-balancer", "resource_type": "load_balancer"}, "name": "my-private-path-service-gateway", "published": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "private_path_service_gateway", "service_endpoints": ["*.example.com"], "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"}, "zonal_affinity": true}], "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "private_path_service_gateways": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5", "default_access_policy": "deny", "endpoint_gateway_binding_auto_delete": true, "endpoint_gateway_binding_auto_delete_timeout": 1, "endpoint_gateway_count": 0, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5", "id": "r006-7268d425-59b7-48fd-9735-81a7271657d5", "lifecycle_state": "stable", "load_balancer": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "name": "my-load-balancer", "resource_type": "load_balancer"}, "name": "my-private-path-service-gateway", "published": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "private_path_service_gateway", "service_endpoints": ["*.example.com"], "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"}, "zonal_affinity": true}], "total_count": 132}' responses.add( responses.GET, url, @@ -52069,7 +52424,7 @@ def test_list_private_path_service_gateways_value_error(self): """ # Set up mock url = preprocess_url('/private_path_service_gateways') - mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "private_path_service_gateways": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213", "default_access_policy": "deny", "endpoint_gateway_binding_auto_delete": true, "endpoint_gateway_binding_auto_delete_timeout": 1, "endpoint_gateway_count": 0, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213", "id": "r134-fb880975-db45-4459-8548-64e3995ac213", "lifecycle_state": "stable", "load_balancer": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "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", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "name": "my-load-balancer", "resource_type": "load_balancer"}, "name": "my-private-path-service-gateway", "published": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "private_path_service_gateway", "service_endpoints": ["*.example.com"], "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"}, "zonal_affinity": true}], "total_count": 132}' + mock_response = '{"first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "private_path_service_gateways": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5", "default_access_policy": "deny", "endpoint_gateway_binding_auto_delete": true, "endpoint_gateway_binding_auto_delete_timeout": 1, "endpoint_gateway_count": 0, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5", "id": "r006-7268d425-59b7-48fd-9735-81a7271657d5", "lifecycle_state": "stable", "load_balancer": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "name": "my-load-balancer", "resource_type": "load_balancer"}, "name": "my-private-path-service-gateway", "published": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "private_path_service_gateway", "service_endpoints": ["*.example.com"], "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"}, "zonal_affinity": true}], "total_count": 132}' responses.add( responses.GET, url, @@ -52079,7 +52434,8 @@ def test_list_private_path_service_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()} with pytest.raises(ValueError): @@ -52101,8 +52457,8 @@ def test_list_private_path_service_gateways_with_pager_get_next(self): """ # Set up a two-page mock response url = preprocess_url('/private_path_service_gateways') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"private_path_service_gateways":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213","default_access_policy":"deny","endpoint_gateway_binding_auto_delete":true,"endpoint_gateway_binding_auto_delete_timeout":1,"endpoint_gateway_count":0,"href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213","id":"r134-fb880975-db45-4459-8548-64e3995ac213","lifecycle_state":"stable","load_balancer":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727","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","id":"dd754295-e9e0-4c9d-bf6c-58fbc59e5727","name":"my-load-balancer","resource_type":"load_balancer"},"name":"my-private-path-service-gateway","published":false,"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"private_path_service_gateway","service_endpoints":["*.example.com"],"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"},"zonal_affinity":true}],"total_count":2,"limit":1}' - mock_response2 = '{"private_path_service_gateways":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213","default_access_policy":"deny","endpoint_gateway_binding_auto_delete":true,"endpoint_gateway_binding_auto_delete_timeout":1,"endpoint_gateway_count":0,"href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213","id":"r134-fb880975-db45-4459-8548-64e3995ac213","lifecycle_state":"stable","load_balancer":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727","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","id":"dd754295-e9e0-4c9d-bf6c-58fbc59e5727","name":"my-load-balancer","resource_type":"load_balancer"},"name":"my-private-path-service-gateway","published":false,"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"private_path_service_gateway","service_endpoints":["*.example.com"],"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"},"zonal_affinity":true}],"total_count":2,"limit":1}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"private_path_service_gateways":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5","default_access_policy":"deny","endpoint_gateway_binding_auto_delete":true,"endpoint_gateway_binding_auto_delete_timeout":1,"endpoint_gateway_count":0,"href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5","id":"r006-7268d425-59b7-48fd-9735-81a7271657d5","lifecycle_state":"stable","load_balancer":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727","name":"my-load-balancer","resource_type":"load_balancer"},"name":"my-private-path-service-gateway","published":false,"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"private_path_service_gateway","service_endpoints":["*.example.com"],"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"},"zonal_affinity":true}],"total_count":2,"limit":1}' + mock_response2 = '{"private_path_service_gateways":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5","default_access_policy":"deny","endpoint_gateway_binding_auto_delete":true,"endpoint_gateway_binding_auto_delete_timeout":1,"endpoint_gateway_count":0,"href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5","id":"r006-7268d425-59b7-48fd-9735-81a7271657d5","lifecycle_state":"stable","load_balancer":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727","name":"my-load-balancer","resource_type":"load_balancer"},"name":"my-private-path-service-gateway","published":false,"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"private_path_service_gateway","service_endpoints":["*.example.com"],"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"},"zonal_affinity":true}],"total_count":2,"limit":1}' responses.add( responses.GET, url, @@ -52138,8 +52494,8 @@ def test_list_private_path_service_gateways_with_pager_get_all(self): """ # Set up a two-page mock response url = preprocess_url('/private_path_service_gateways') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"private_path_service_gateways":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213","default_access_policy":"deny","endpoint_gateway_binding_auto_delete":true,"endpoint_gateway_binding_auto_delete_timeout":1,"endpoint_gateway_count":0,"href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213","id":"r134-fb880975-db45-4459-8548-64e3995ac213","lifecycle_state":"stable","load_balancer":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727","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","id":"dd754295-e9e0-4c9d-bf6c-58fbc59e5727","name":"my-load-balancer","resource_type":"load_balancer"},"name":"my-private-path-service-gateway","published":false,"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"private_path_service_gateway","service_endpoints":["*.example.com"],"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"},"zonal_affinity":true}],"total_count":2,"limit":1}' - mock_response2 = '{"private_path_service_gateways":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213","default_access_policy":"deny","endpoint_gateway_binding_auto_delete":true,"endpoint_gateway_binding_auto_delete_timeout":1,"endpoint_gateway_count":0,"href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213","id":"r134-fb880975-db45-4459-8548-64e3995ac213","lifecycle_state":"stable","load_balancer":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727","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","id":"dd754295-e9e0-4c9d-bf6c-58fbc59e5727","name":"my-load-balancer","resource_type":"load_balancer"},"name":"my-private-path-service-gateway","published":false,"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"private_path_service_gateway","service_endpoints":["*.example.com"],"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"},"zonal_affinity":true}],"total_count":2,"limit":1}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"private_path_service_gateways":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5","default_access_policy":"deny","endpoint_gateway_binding_auto_delete":true,"endpoint_gateway_binding_auto_delete_timeout":1,"endpoint_gateway_count":0,"href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5","id":"r006-7268d425-59b7-48fd-9735-81a7271657d5","lifecycle_state":"stable","load_balancer":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727","name":"my-load-balancer","resource_type":"load_balancer"},"name":"my-private-path-service-gateway","published":false,"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"private_path_service_gateway","service_endpoints":["*.example.com"],"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"},"zonal_affinity":true}],"total_count":2,"limit":1}' + mock_response2 = '{"private_path_service_gateways":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5","default_access_policy":"deny","endpoint_gateway_binding_auto_delete":true,"endpoint_gateway_binding_auto_delete_timeout":1,"endpoint_gateway_count":0,"href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5","id":"r006-7268d425-59b7-48fd-9735-81a7271657d5","lifecycle_state":"stable","load_balancer":{"crn":"crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727","name":"my-load-balancer","resource_type":"load_balancer"},"name":"my-private-path-service-gateway","published":false,"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"private_path_service_gateway","service_endpoints":["*.example.com"],"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"},"zonal_affinity":true}],"total_count":2,"limit":1}' responses.add( responses.GET, url, @@ -52178,7 +52534,7 @@ def test_create_private_path_service_gateway_all_params(self): """ # Set up mock url = preprocess_url('/private_path_service_gateways') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213", "default_access_policy": "deny", "endpoint_gateway_binding_auto_delete": true, "endpoint_gateway_binding_auto_delete_timeout": 1, "endpoint_gateway_count": 0, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213", "id": "r134-fb880975-db45-4459-8548-64e3995ac213", "lifecycle_state": "stable", "load_balancer": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "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", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "name": "my-load-balancer", "resource_type": "load_balancer"}, "name": "my-private-path-service-gateway", "published": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "private_path_service_gateway", "service_endpoints": ["*.example.com"], "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"}, "zonal_affinity": true}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5", "default_access_policy": "deny", "endpoint_gateway_binding_auto_delete": true, "endpoint_gateway_binding_auto_delete_timeout": 1, "endpoint_gateway_count": 0, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5", "id": "r006-7268d425-59b7-48fd-9735-81a7271657d5", "lifecycle_state": "stable", "load_balancer": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "name": "my-load-balancer", "resource_type": "load_balancer"}, "name": "my-private-path-service-gateway", "published": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "private_path_service_gateway", "service_endpoints": ["*.example.com"], "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"}, "zonal_affinity": true}' responses.add( responses.POST, url, @@ -52189,7 +52545,7 @@ def test_create_private_path_service_gateway_all_params(self): # 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'] = 'r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727' # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -52242,7 +52598,7 @@ def test_create_private_path_service_gateway_value_error(self): """ # Set up mock url = preprocess_url('/private_path_service_gateways') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213", "default_access_policy": "deny", "endpoint_gateway_binding_auto_delete": true, "endpoint_gateway_binding_auto_delete_timeout": 1, "endpoint_gateway_count": 0, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213", "id": "r134-fb880975-db45-4459-8548-64e3995ac213", "lifecycle_state": "stable", "load_balancer": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "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", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "name": "my-load-balancer", "resource_type": "load_balancer"}, "name": "my-private-path-service-gateway", "published": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "private_path_service_gateway", "service_endpoints": ["*.example.com"], "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"}, "zonal_affinity": true}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5", "default_access_policy": "deny", "endpoint_gateway_binding_auto_delete": true, "endpoint_gateway_binding_auto_delete_timeout": 1, "endpoint_gateway_count": 0, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5", "id": "r006-7268d425-59b7-48fd-9735-81a7271657d5", "lifecycle_state": "stable", "load_balancer": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "name": "my-load-balancer", "resource_type": "load_balancer"}, "name": "my-private-path-service-gateway", "published": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "private_path_service_gateway", "service_endpoints": ["*.example.com"], "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"}, "zonal_affinity": true}' responses.add( responses.POST, url, @@ -52253,7 +52609,7 @@ def test_create_private_path_service_gateway_value_error(self): # 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'] = 'r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727' # Construct a dict representation of a ResourceGroupIdentityById model resource_group_identity_model = {} @@ -52374,7 +52730,7 @@ def test_get_private_path_service_gateway_all_params(self): """ # Set up mock url = preprocess_url('/private_path_service_gateways/testString') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213", "default_access_policy": "deny", "endpoint_gateway_binding_auto_delete": true, "endpoint_gateway_binding_auto_delete_timeout": 1, "endpoint_gateway_count": 0, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213", "id": "r134-fb880975-db45-4459-8548-64e3995ac213", "lifecycle_state": "stable", "load_balancer": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "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", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "name": "my-load-balancer", "resource_type": "load_balancer"}, "name": "my-private-path-service-gateway", "published": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "private_path_service_gateway", "service_endpoints": ["*.example.com"], "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"}, "zonal_affinity": true}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5", "default_access_policy": "deny", "endpoint_gateway_binding_auto_delete": true, "endpoint_gateway_binding_auto_delete_timeout": 1, "endpoint_gateway_count": 0, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5", "id": "r006-7268d425-59b7-48fd-9735-81a7271657d5", "lifecycle_state": "stable", "load_balancer": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "name": "my-load-balancer", "resource_type": "load_balancer"}, "name": "my-private-path-service-gateway", "published": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "private_path_service_gateway", "service_endpoints": ["*.example.com"], "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"}, "zonal_affinity": true}' responses.add( responses.GET, url, @@ -52412,7 +52768,7 @@ def test_get_private_path_service_gateway_value_error(self): """ # Set up mock url = preprocess_url('/private_path_service_gateways/testString') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213", "default_access_policy": "deny", "endpoint_gateway_binding_auto_delete": true, "endpoint_gateway_binding_auto_delete_timeout": 1, "endpoint_gateway_count": 0, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213", "id": "r134-fb880975-db45-4459-8548-64e3995ac213", "lifecycle_state": "stable", "load_balancer": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "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", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "name": "my-load-balancer", "resource_type": "load_balancer"}, "name": "my-private-path-service-gateway", "published": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "private_path_service_gateway", "service_endpoints": ["*.example.com"], "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"}, "zonal_affinity": true}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5", "default_access_policy": "deny", "endpoint_gateway_binding_auto_delete": true, "endpoint_gateway_binding_auto_delete_timeout": 1, "endpoint_gateway_count": 0, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5", "id": "r006-7268d425-59b7-48fd-9735-81a7271657d5", "lifecycle_state": "stable", "load_balancer": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "name": "my-load-balancer", "resource_type": "load_balancer"}, "name": "my-private-path-service-gateway", "published": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "private_path_service_gateway", "service_endpoints": ["*.example.com"], "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"}, "zonal_affinity": true}' responses.add( responses.GET, url, @@ -52455,7 +52811,7 @@ def test_update_private_path_service_gateway_all_params(self): """ # Set up mock url = preprocess_url('/private_path_service_gateways/testString') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213", "default_access_policy": "deny", "endpoint_gateway_binding_auto_delete": true, "endpoint_gateway_binding_auto_delete_timeout": 1, "endpoint_gateway_count": 0, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213", "id": "r134-fb880975-db45-4459-8548-64e3995ac213", "lifecycle_state": "stable", "load_balancer": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "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", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "name": "my-load-balancer", "resource_type": "load_balancer"}, "name": "my-private-path-service-gateway", "published": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "private_path_service_gateway", "service_endpoints": ["*.example.com"], "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"}, "zonal_affinity": true}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5", "default_access_policy": "deny", "endpoint_gateway_binding_auto_delete": true, "endpoint_gateway_binding_auto_delete_timeout": 1, "endpoint_gateway_count": 0, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5", "id": "r006-7268d425-59b7-48fd-9735-81a7271657d5", "lifecycle_state": "stable", "load_balancer": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "name": "my-load-balancer", "resource_type": "load_balancer"}, "name": "my-private-path-service-gateway", "published": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "private_path_service_gateway", "service_endpoints": ["*.example.com"], "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"}, "zonal_affinity": true}' responses.add( responses.PATCH, url, @@ -52466,7 +52822,7 @@ def test_update_private_path_service_gateway_all_params(self): # 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'] = 'r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727' # Construct a dict representation of a PrivatePathServiceGatewayPatch model private_path_service_gateway_patch_model = {} @@ -52509,7 +52865,7 @@ def test_update_private_path_service_gateway_value_error(self): """ # Set up mock url = preprocess_url('/private_path_service_gateways/testString') - mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213", "default_access_policy": "deny", "endpoint_gateway_binding_auto_delete": true, "endpoint_gateway_binding_auto_delete_timeout": 1, "endpoint_gateway_count": 0, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213", "id": "r134-fb880975-db45-4459-8548-64e3995ac213", "lifecycle_state": "stable", "load_balancer": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "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", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "name": "my-load-balancer", "resource_type": "load_balancer"}, "name": "my-private-path-service-gateway", "published": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "private_path_service_gateway", "service_endpoints": ["*.example.com"], "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"}, "zonal_affinity": true}' + mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5", "default_access_policy": "deny", "endpoint_gateway_binding_auto_delete": true, "endpoint_gateway_binding_auto_delete_timeout": 1, "endpoint_gateway_count": 0, "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5", "id": "r006-7268d425-59b7-48fd-9735-81a7271657d5", "lifecycle_state": "stable", "load_balancer": {"crn": "crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "name": "my-load-balancer", "resource_type": "load_balancer"}, "name": "my-private-path-service-gateway", "published": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "private_path_service_gateway", "service_endpoints": ["*.example.com"], "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"}, "zonal_affinity": true}' responses.add( responses.PATCH, url, @@ -52520,7 +52876,7 @@ def test_update_private_path_service_gateway_value_error(self): # 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'] = 'r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727' # Construct a dict representation of a PrivatePathServiceGatewayPatch model private_path_service_gateway_patch_model = {} @@ -52565,7 +52921,7 @@ def test_list_private_path_service_gateway_account_policies_all_params(self): """ # Set up mock url = preprocess_url('/private_path_service_gateways/testString/account_policies') - mock_response = '{"account_policies": [{"access_policy": "deny", "account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213/account_policies/dd455384-b019-4242-9453-45fe68b18e4c", "id": "r134-fb880975-db45-4459-8548-64e3995ac213", "resource_type": "private_path_service_gateway_account_policy"}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"account_policies": [{"access_policy": "deny", "account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/dd455384-b019-4242-9453-45fe68b18e4c", "id": "r006-7268d425-59b7-48fd-9735-81a7271657d5", "resource_type": "private_path_service_gateway_account_policy"}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -52615,7 +52971,7 @@ def test_list_private_path_service_gateway_account_policies_required_params(self """ # Set up mock url = preprocess_url('/private_path_service_gateways/testString/account_policies') - mock_response = '{"account_policies": [{"access_policy": "deny", "account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213/account_policies/dd455384-b019-4242-9453-45fe68b18e4c", "id": "r134-fb880975-db45-4459-8548-64e3995ac213", "resource_type": "private_path_service_gateway_account_policy"}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"account_policies": [{"access_policy": "deny", "account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/dd455384-b019-4242-9453-45fe68b18e4c", "id": "r006-7268d425-59b7-48fd-9735-81a7271657d5", "resource_type": "private_path_service_gateway_account_policy"}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -52653,7 +53009,7 @@ def test_list_private_path_service_gateway_account_policies_value_error(self): """ # Set up mock url = preprocess_url('/private_path_service_gateways/testString/account_policies') - mock_response = '{"account_policies": [{"access_policy": "deny", "account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213/account_policies/dd455384-b019-4242-9453-45fe68b18e4c", "id": "r134-fb880975-db45-4459-8548-64e3995ac213", "resource_type": "private_path_service_gateway_account_policy"}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"account_policies": [{"access_policy": "deny", "account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/dd455384-b019-4242-9453-45fe68b18e4c", "id": "r006-7268d425-59b7-48fd-9735-81a7271657d5", "resource_type": "private_path_service_gateway_account_policy"}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -52690,8 +53046,8 @@ def test_list_private_path_service_gateway_account_policies_with_pager_get_next( """ # Set up a two-page mock response url = preprocess_url('/private_path_service_gateways/testString/account_policies') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"account_policies":[{"access_policy":"deny","account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213/account_policies/dd455384-b019-4242-9453-45fe68b18e4c","id":"r134-fb880975-db45-4459-8548-64e3995ac213","resource_type":"private_path_service_gateway_account_policy"}]}' - mock_response2 = '{"total_count":2,"limit":1,"account_policies":[{"access_policy":"deny","account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213/account_policies/dd455384-b019-4242-9453-45fe68b18e4c","id":"r134-fb880975-db45-4459-8548-64e3995ac213","resource_type":"private_path_service_gateway_account_policy"}]}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"account_policies":[{"access_policy":"deny","account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/dd455384-b019-4242-9453-45fe68b18e4c","id":"r006-7268d425-59b7-48fd-9735-81a7271657d5","resource_type":"private_path_service_gateway_account_policy"}]}' + mock_response2 = '{"total_count":2,"limit":1,"account_policies":[{"access_policy":"deny","account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/dd455384-b019-4242-9453-45fe68b18e4c","id":"r006-7268d425-59b7-48fd-9735-81a7271657d5","resource_type":"private_path_service_gateway_account_policy"}]}' responses.add( responses.GET, url, @@ -52728,8 +53084,8 @@ def test_list_private_path_service_gateway_account_policies_with_pager_get_all(s """ # Set up a two-page mock response url = preprocess_url('/private_path_service_gateways/testString/account_policies') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"account_policies":[{"access_policy":"deny","account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213/account_policies/dd455384-b019-4242-9453-45fe68b18e4c","id":"r134-fb880975-db45-4459-8548-64e3995ac213","resource_type":"private_path_service_gateway_account_policy"}]}' - mock_response2 = '{"total_count":2,"limit":1,"account_policies":[{"access_policy":"deny","account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213/account_policies/dd455384-b019-4242-9453-45fe68b18e4c","id":"r134-fb880975-db45-4459-8548-64e3995ac213","resource_type":"private_path_service_gateway_account_policy"}]}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"account_policies":[{"access_policy":"deny","account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/dd455384-b019-4242-9453-45fe68b18e4c","id":"r006-7268d425-59b7-48fd-9735-81a7271657d5","resource_type":"private_path_service_gateway_account_policy"}]}' + mock_response2 = '{"total_count":2,"limit":1,"account_policies":[{"access_policy":"deny","account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/dd455384-b019-4242-9453-45fe68b18e4c","id":"r006-7268d425-59b7-48fd-9735-81a7271657d5","resource_type":"private_path_service_gateway_account_policy"}]}' responses.add( responses.GET, url, @@ -52769,7 +53125,7 @@ def test_create_private_path_service_gateway_account_policy_all_params(self): """ # Set up mock url = preprocess_url('/private_path_service_gateways/testString/account_policies') - mock_response = '{"access_policy": "deny", "account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213/account_policies/dd455384-b019-4242-9453-45fe68b18e4c", "id": "r134-fb880975-db45-4459-8548-64e3995ac213", "resource_type": "private_path_service_gateway_account_policy"}' + mock_response = '{"access_policy": "deny", "account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/dd455384-b019-4242-9453-45fe68b18e4c", "id": "r006-7268d425-59b7-48fd-9735-81a7271657d5", "resource_type": "private_path_service_gateway_account_policy"}' responses.add( responses.POST, url, @@ -52819,7 +53175,7 @@ def test_create_private_path_service_gateway_account_policy_value_error(self): """ # Set up mock url = preprocess_url('/private_path_service_gateways/testString/account_policies') - mock_response = '{"access_policy": "deny", "account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213/account_policies/dd455384-b019-4242-9453-45fe68b18e4c", "id": "r134-fb880975-db45-4459-8548-64e3995ac213", "resource_type": "private_path_service_gateway_account_policy"}' + mock_response = '{"access_policy": "deny", "account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/dd455384-b019-4242-9453-45fe68b18e4c", "id": "r006-7268d425-59b7-48fd-9735-81a7271657d5", "resource_type": "private_path_service_gateway_account_policy"}' responses.add( responses.POST, url, @@ -52949,7 +53305,7 @@ def test_get_private_path_service_gateway_account_policy_all_params(self): """ # Set up mock url = preprocess_url('/private_path_service_gateways/testString/account_policies/testString') - mock_response = '{"access_policy": "deny", "account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213/account_policies/dd455384-b019-4242-9453-45fe68b18e4c", "id": "r134-fb880975-db45-4459-8548-64e3995ac213", "resource_type": "private_path_service_gateway_account_policy"}' + mock_response = '{"access_policy": "deny", "account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/dd455384-b019-4242-9453-45fe68b18e4c", "id": "r006-7268d425-59b7-48fd-9735-81a7271657d5", "resource_type": "private_path_service_gateway_account_policy"}' responses.add( responses.GET, url, @@ -52989,7 +53345,7 @@ def test_get_private_path_service_gateway_account_policy_value_error(self): """ # Set up mock url = preprocess_url('/private_path_service_gateways/testString/account_policies/testString') - mock_response = '{"access_policy": "deny", "account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213/account_policies/dd455384-b019-4242-9453-45fe68b18e4c", "id": "r134-fb880975-db45-4459-8548-64e3995ac213", "resource_type": "private_path_service_gateway_account_policy"}' + mock_response = '{"access_policy": "deny", "account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/dd455384-b019-4242-9453-45fe68b18e4c", "id": "r006-7268d425-59b7-48fd-9735-81a7271657d5", "resource_type": "private_path_service_gateway_account_policy"}' responses.add( responses.GET, url, @@ -53034,7 +53390,7 @@ def test_update_private_path_service_gateway_account_policy_all_params(self): """ # Set up mock url = preprocess_url('/private_path_service_gateways/testString/account_policies/testString') - mock_response = '{"access_policy": "deny", "account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213/account_policies/dd455384-b019-4242-9453-45fe68b18e4c", "id": "r134-fb880975-db45-4459-8548-64e3995ac213", "resource_type": "private_path_service_gateway_account_policy"}' + mock_response = '{"access_policy": "deny", "account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/dd455384-b019-4242-9453-45fe68b18e4c", "id": "r006-7268d425-59b7-48fd-9735-81a7271657d5", "resource_type": "private_path_service_gateway_account_policy"}' responses.add( responses.PATCH, url, @@ -53045,7 +53401,7 @@ def test_update_private_path_service_gateway_account_policy_all_params(self): # Construct a dict representation of a PrivatePathServiceGatewayAccountPolicyPatch model private_path_service_gateway_account_policy_patch_model = {} - private_path_service_gateway_account_policy_patch_model['access_policy'] = 'deny' + private_path_service_gateway_account_policy_patch_model['access_policy'] = 'review' # Set up parameter values private_path_service_gateway_id = 'testString' @@ -53083,7 +53439,7 @@ def test_update_private_path_service_gateway_account_policy_value_error(self): """ # Set up mock url = preprocess_url('/private_path_service_gateways/testString/account_policies/testString') - mock_response = '{"access_policy": "deny", "account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213/account_policies/dd455384-b019-4242-9453-45fe68b18e4c", "id": "r134-fb880975-db45-4459-8548-64e3995ac213", "resource_type": "private_path_service_gateway_account_policy"}' + mock_response = '{"access_policy": "deny", "account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/dd455384-b019-4242-9453-45fe68b18e4c", "id": "r006-7268d425-59b7-48fd-9735-81a7271657d5", "resource_type": "private_path_service_gateway_account_policy"}' responses.add( responses.PATCH, url, @@ -53094,7 +53450,7 @@ def test_update_private_path_service_gateway_account_policy_value_error(self): # Construct a dict representation of a PrivatePathServiceGatewayAccountPolicyPatch model private_path_service_gateway_account_policy_patch_model = {} - private_path_service_gateway_account_policy_patch_model['access_policy'] = 'deny' + private_path_service_gateway_account_policy_patch_model['access_policy'] = 'review' # Set up parameter values private_path_service_gateway_id = 'testString' @@ -53134,7 +53490,7 @@ def test_list_private_path_service_gateway_endpoint_gateway_bindings_all_params( """ # Set up mock url = preprocess_url('/private_path_service_gateways/testString/endpoint_gateway_bindings') - mock_response = '{"endpoint_gateway_bindings": [{"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "created_at": "2019-01-01T12:00:00.000Z", "expiration_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213/endpoint_gateway_bindings/r134-ce9dac18-dea0-4392-841c-142d3300674f", "id": "r134-ce9dac18-dea0-4392-841c-142d3300674f", "lifecycle_state": "stable", "resource_type": "private_path_service_gateway_endpoint_gateway_binding", "status": "abandoned"}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"endpoint_gateway_bindings": [{"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "created_at": "2019-01-01T12:00:00.000Z", "expiration_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/endpoint_gateway_bindings/r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0", "id": "r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0", "lifecycle_state": "stable", "resource_type": "private_path_service_gateway_endpoint_gateway_binding", "status": "abandoned"}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -53187,7 +53543,7 @@ def test_list_private_path_service_gateway_endpoint_gateway_bindings_required_pa """ # Set up mock url = preprocess_url('/private_path_service_gateways/testString/endpoint_gateway_bindings') - mock_response = '{"endpoint_gateway_bindings": [{"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "created_at": "2019-01-01T12:00:00.000Z", "expiration_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213/endpoint_gateway_bindings/r134-ce9dac18-dea0-4392-841c-142d3300674f", "id": "r134-ce9dac18-dea0-4392-841c-142d3300674f", "lifecycle_state": "stable", "resource_type": "private_path_service_gateway_endpoint_gateway_binding", "status": "abandoned"}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"endpoint_gateway_bindings": [{"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "created_at": "2019-01-01T12:00:00.000Z", "expiration_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/endpoint_gateway_bindings/r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0", "id": "r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0", "lifecycle_state": "stable", "resource_type": "private_path_service_gateway_endpoint_gateway_binding", "status": "abandoned"}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -53225,7 +53581,7 @@ def test_list_private_path_service_gateway_endpoint_gateway_bindings_value_error """ # Set up mock url = preprocess_url('/private_path_service_gateways/testString/endpoint_gateway_bindings') - mock_response = '{"endpoint_gateway_bindings": [{"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "created_at": "2019-01-01T12:00:00.000Z", "expiration_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213/endpoint_gateway_bindings/r134-ce9dac18-dea0-4392-841c-142d3300674f", "id": "r134-ce9dac18-dea0-4392-841c-142d3300674f", "lifecycle_state": "stable", "resource_type": "private_path_service_gateway_endpoint_gateway_binding", "status": "abandoned"}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' + mock_response = '{"endpoint_gateway_bindings": [{"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "created_at": "2019-01-01T12:00:00.000Z", "expiration_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/endpoint_gateway_bindings/r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0", "id": "r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0", "lifecycle_state": "stable", "resource_type": "private_path_service_gateway_endpoint_gateway_binding", "status": "abandoned"}], "first": {"href": "href"}, "limit": 20, "next": {"href": "href"}, "total_count": 132}' responses.add( responses.GET, url, @@ -53262,8 +53618,8 @@ def test_list_private_path_service_gateway_endpoint_gateway_bindings_with_pager_ """ # Set up a two-page mock response url = preprocess_url('/private_path_service_gateways/testString/endpoint_gateway_bindings') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"endpoint_gateway_bindings":[{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"created_at":"2019-01-01T12:00:00.000Z","expiration_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213/endpoint_gateway_bindings/r134-ce9dac18-dea0-4392-841c-142d3300674f","id":"r134-ce9dac18-dea0-4392-841c-142d3300674f","lifecycle_state":"stable","resource_type":"private_path_service_gateway_endpoint_gateway_binding","status":"abandoned"}]}' - mock_response2 = '{"total_count":2,"limit":1,"endpoint_gateway_bindings":[{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"created_at":"2019-01-01T12:00:00.000Z","expiration_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213/endpoint_gateway_bindings/r134-ce9dac18-dea0-4392-841c-142d3300674f","id":"r134-ce9dac18-dea0-4392-841c-142d3300674f","lifecycle_state":"stable","resource_type":"private_path_service_gateway_endpoint_gateway_binding","status":"abandoned"}]}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"endpoint_gateway_bindings":[{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"created_at":"2019-01-01T12:00:00.000Z","expiration_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/endpoint_gateway_bindings/r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0","id":"r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0","lifecycle_state":"stable","resource_type":"private_path_service_gateway_endpoint_gateway_binding","status":"abandoned"}]}' + mock_response2 = '{"total_count":2,"limit":1,"endpoint_gateway_bindings":[{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"created_at":"2019-01-01T12:00:00.000Z","expiration_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/endpoint_gateway_bindings/r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0","id":"r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0","lifecycle_state":"stable","resource_type":"private_path_service_gateway_endpoint_gateway_binding","status":"abandoned"}]}' responses.add( responses.GET, url, @@ -53301,8 +53657,8 @@ def test_list_private_path_service_gateway_endpoint_gateway_bindings_with_pager_ """ # Set up a two-page mock response url = preprocess_url('/private_path_service_gateways/testString/endpoint_gateway_bindings') - mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"endpoint_gateway_bindings":[{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"created_at":"2019-01-01T12:00:00.000Z","expiration_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213/endpoint_gateway_bindings/r134-ce9dac18-dea0-4392-841c-142d3300674f","id":"r134-ce9dac18-dea0-4392-841c-142d3300674f","lifecycle_state":"stable","resource_type":"private_path_service_gateway_endpoint_gateway_binding","status":"abandoned"}]}' - mock_response2 = '{"total_count":2,"limit":1,"endpoint_gateway_bindings":[{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"created_at":"2019-01-01T12:00:00.000Z","expiration_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213/endpoint_gateway_bindings/r134-ce9dac18-dea0-4392-841c-142d3300674f","id":"r134-ce9dac18-dea0-4392-841c-142d3300674f","lifecycle_state":"stable","resource_type":"private_path_service_gateway_endpoint_gateway_binding","status":"abandoned"}]}' + mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"endpoint_gateway_bindings":[{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"created_at":"2019-01-01T12:00:00.000Z","expiration_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/endpoint_gateway_bindings/r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0","id":"r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0","lifecycle_state":"stable","resource_type":"private_path_service_gateway_endpoint_gateway_binding","status":"abandoned"}]}' + mock_response2 = '{"total_count":2,"limit":1,"endpoint_gateway_bindings":[{"account":{"id":"bb1b52262f7441a586f49068482f1e60","resource_type":"account"},"created_at":"2019-01-01T12:00:00.000Z","expiration_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/endpoint_gateway_bindings/r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0","id":"r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0","lifecycle_state":"stable","resource_type":"private_path_service_gateway_endpoint_gateway_binding","status":"abandoned"}]}' responses.add( responses.GET, url, @@ -53343,7 +53699,7 @@ def test_get_private_path_service_gateway_endpoint_gateway_binding_all_params(se """ # Set up mock url = preprocess_url('/private_path_service_gateways/testString/endpoint_gateway_bindings/testString') - mock_response = '{"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "created_at": "2019-01-01T12:00:00.000Z", "expiration_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213/endpoint_gateway_bindings/r134-ce9dac18-dea0-4392-841c-142d3300674f", "id": "r134-ce9dac18-dea0-4392-841c-142d3300674f", "lifecycle_state": "stable", "resource_type": "private_path_service_gateway_endpoint_gateway_binding", "status": "abandoned"}' + mock_response = '{"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "created_at": "2019-01-01T12:00:00.000Z", "expiration_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/endpoint_gateway_bindings/r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0", "id": "r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0", "lifecycle_state": "stable", "resource_type": "private_path_service_gateway_endpoint_gateway_binding", "status": "abandoned"}' responses.add( responses.GET, url, @@ -53383,7 +53739,7 @@ def test_get_private_path_service_gateway_endpoint_gateway_binding_value_error(s """ # Set up mock url = preprocess_url('/private_path_service_gateways/testString/endpoint_gateway_bindings/testString') - mock_response = '{"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "created_at": "2019-01-01T12:00:00.000Z", "expiration_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213/endpoint_gateway_bindings/r134-ce9dac18-dea0-4392-841c-142d3300674f", "id": "r134-ce9dac18-dea0-4392-841c-142d3300674f", "lifecycle_state": "stable", "resource_type": "private_path_service_gateway_endpoint_gateway_binding", "status": "abandoned"}' + mock_response = '{"account": {"id": "bb1b52262f7441a586f49068482f1e60", "resource_type": "account"}, "created_at": "2019-01-01T12:00:00.000Z", "expiration_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/endpoint_gateway_bindings/r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0", "id": "r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0", "lifecycle_state": "stable", "resource_type": "private_path_service_gateway_endpoint_gateway_binding", "status": "abandoned"}' responses.add( responses.GET, url, @@ -53962,9 +54318,7 @@ 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' @@ -54006,18 +54360,14 @@ def test_address_prefix_collection_serialization(self): 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 page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/a4e28308-8ee7-46ab-8108-9f881f22bdbf/address_prefixes?limit=20' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/a4e28308-8ee7-46ab-8108-9f881f22bdbf/address_prefixes?limit=20' # Construct a json representation of a AddressPrefixCollection model address_prefix_collection_model_json = {} @@ -54032,9 +54382,7 @@ def test_address_prefix_collection_serialization(self): 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_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 @@ -54091,9 +54439,7 @@ def test_backup_policy_collection_serialization(self): 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_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui' deleted_model = {} # Deleted deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' @@ -54107,52 +54453,42 @@ def test_backup_policy_collection_serialization(self): backup_policy_plan_reference_model = {} # BackupPolicyPlanReference backup_policy_plan_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model['id'] = 'r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model['name'] = 'my-backup-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['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['name'] = 'Default' 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'] = 'ebc2b430240943458b9e91e1432cfcce' 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['created_at'] = '2024-12-04T15:06:03Z' + backup_policy_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-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['id'] = 'r134-076191ba-49c2-4763-94fd-c70de73ee2e6' + backup_policy_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6' + backup_policy_model['id'] = 'r006-076191ba-49c2-4763-94fd-c70de73ee2e6' backup_policy_model['last_job_completed_at'] = '2019-01-01T12:00:00Z' backup_policy_model['lifecycle_state'] = 'stable' - backup_policy_model['match_user_tags'] = ['my-daily-backup-policy'] + backup_policy_model['match_user_tags'] = ['my-tag-1', 'my-tag-2'] backup_policy_model['name'] = 'my-backup-policy' backup_policy_model['plans'] = [backup_policy_plan_reference_model] backup_policy_model['resource_group'] = resource_group_reference_model backup_policy_model['resource_type'] = 'backup_policy' backup_policy_model['scope'] = backup_policy_scope_model - backup_policy_model['included_content'] = ['data_volumes'] - backup_policy_model['match_resource_type'] = 'instance' + backup_policy_model['included_content'] = ['data_volume'] + backup_policy_model['match_resource_type'] = 'volume' page_link_model = {} # PageLink - page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies?limit=20' + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies?limit=50' # Construct a json representation of a BackupPolicyCollection model backup_policy_collection_model_json = {} @@ -54167,9 +54503,7 @@ def test_backup_policy_collection_serialization(self): 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_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 @@ -54193,21 +54527,15 @@ 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['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) 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_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 @@ -54242,11 +54570,9 @@ def test_backup_policy_job_serialization(self): backup_policy_plan_reference_model = {} # BackupPolicyPlanReference backup_policy_plan_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model['id'] = 'r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model['name'] = 'my-backup-plan' backup_policy_plan_reference_model['remote'] = backup_policy_plan_remote_model backup_policy_plan_reference_model['resource_type'] = 'backup_policy_plan' @@ -54254,13 +54580,9 @@ def test_backup_policy_job_serialization(self): 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['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' backup_policy_job_source_model['deleted'] = 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['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 @@ -54269,9 +54591,7 @@ def test_backup_policy_job_serialization(self): 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' account_reference_model = {} # AccountReference account_reference_model['id'] = 'bb1b52262f7441a586f49068482f1e60' @@ -54281,18 +54601,14 @@ def test_backup_policy_job_serialization(self): snapshot_remote_model['account'] = account_reference_model 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['deleted'] = 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['name'] = 'my-snapshot' - snapshot_reference_model['remote'] = snapshot_remote_model - snapshot_reference_model['resource_type'] = 'snapshot' + backup_policy_target_snapshot_model = {} # BackupPolicyTargetSnapshotSnapshotReference + backup_policy_target_snapshot_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-5886f8e4-5b0c-4378-9a75-82930936593e' + backup_policy_target_snapshot_model['deleted'] = deleted_model + backup_policy_target_snapshot_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-5886f8e4-5b0c-4378-9a75-82930936593e' + backup_policy_target_snapshot_model['id'] = 'r006-5886f8e4-5b0c-4378-9a75-82930936593e' + backup_policy_target_snapshot_model['name'] = 'my-backup-plan-1-364d6c2da03e-447d' + backup_policy_target_snapshot_model['remote'] = snapshot_remote_model + backup_policy_target_snapshot_model['resource_type'] = 'snapshot' # Construct a json representation of a BackupPolicyJob model backup_policy_job_model_json = {} @@ -54301,16 +54617,14 @@ def test_backup_policy_job_serialization(self): 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/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/jobs/r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90' + backup_policy_job_model_json['id'] = 'r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90' 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['target_snapshots'] = [backup_policy_target_snapshot_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) @@ -54341,9 +54655,7 @@ def test_backup_policy_job_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/7241e2a8-601f-11ea-8503-000c29475bed/jobs?limit=20' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/jobs?limit=50' deleted_model = {} # Deleted deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' @@ -54357,11 +54669,9 @@ def test_backup_policy_job_collection_serialization(self): backup_policy_plan_reference_model = {} # BackupPolicyPlanReference backup_policy_plan_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model['id'] = 'r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model['name'] = 'my-backup-plan' backup_policy_plan_reference_model['remote'] = backup_policy_plan_remote_model backup_policy_plan_reference_model['resource_type'] = 'backup_policy_plan' @@ -54369,13 +54679,9 @@ def test_backup_policy_job_collection_serialization(self): 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['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-1a6b7274-678d-4dfb-8981-c71dd9d4daa5' backup_policy_job_source_model['deleted'] = 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['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 @@ -54384,9 +54690,7 @@ def test_backup_policy_job_collection_serialization(self): 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' account_reference_model = {} # AccountReference account_reference_model['id'] = 'bb1b52262f7441a586f49068482f1e60' @@ -54396,35 +54700,29 @@ def test_backup_policy_job_collection_serialization(self): snapshot_remote_model['account'] = account_reference_model 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['deleted'] = 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['name'] = 'my-snapshot' - snapshot_reference_model['remote'] = snapshot_remote_model - snapshot_reference_model['resource_type'] = 'snapshot' + backup_policy_target_snapshot_model = {} # BackupPolicyTargetSnapshotSnapshotReference + backup_policy_target_snapshot_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r006-5886f8e4-5b0c-4378-9a75-82930936593e' + backup_policy_target_snapshot_model['deleted'] = deleted_model + backup_policy_target_snapshot_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-5886f8e4-5b0c-4378-9a75-82930936593e' + backup_policy_target_snapshot_model['id'] = 'r006-5886f8e4-5b0c-4378-9a75-82930936593e' + backup_policy_target_snapshot_model['name'] = 'my-backup-plan-1-364d6c2da03e-447d' + backup_policy_target_snapshot_model['remote'] = snapshot_remote_model + backup_policy_target_snapshot_model['resource_type'] = 'snapshot' backup_policy_job_model = {} # BackupPolicyJob backup_policy_job_model['auto_delete'] = True - backup_policy_job_model['auto_delete_after'] = 90 + backup_policy_job_model['auto_delete_after'] = 15 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['id'] = '4cf9171a-0043-4434-8727-15b53dbc374c' + backup_policy_job_model['completed_at'] = '2022-04-22T20:59:34Z' + backup_policy_job_model['created_at'] = '2022-04-22T20:59:11Z' + backup_policy_job_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/jobs/r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90' + backup_policy_job_model['id'] = 'r006-fc4b7fbc-38af-45d9-9fb6-bf0533acbf90' 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'] = 'succeeded' backup_policy_job_model['status_reasons'] = [backup_policy_job_status_reason_model] - backup_policy_job_model['target_snapshots'] = [snapshot_reference_model] + backup_policy_job_model['target_snapshots'] = [backup_policy_target_snapshot_model] # Construct a json representation of a BackupPolicyJobCollection model backup_policy_job_collection_model_json = {} @@ -54435,15 +54733,11 @@ def test_backup_policy_job_collection_serialization(self): 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_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 @@ -54468,23 +54762,15 @@ def test_backup_policy_job_status_reason_serialization(self): 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['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 @@ -54547,13 +54833,11 @@ def test_backup_policy_plan_serialization(self): backup_policy_plan_clone_policy_model['zones'] = [zone_reference_model] backup_policy_plan_deletion_trigger_model = {} # BackupPolicyPlanDeletionTrigger - backup_policy_plan_deletion_trigger_model['delete_after'] = 20 + backup_policy_plan_deletion_trigger_model['delete_after'] = 5 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' @@ -54573,10 +54857,8 @@ def test_backup_policy_plan_serialization(self): 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_model_json['id'] = 'r006-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] @@ -54620,18 +54902,12 @@ def test_backup_policy_plan_clone_policy_serialization(self): 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 @@ -54662,18 +54938,12 @@ def test_backup_policy_plan_clone_policy_patch_serialization(self): 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 @@ -54704,30 +54974,19 @@ def test_backup_policy_plan_clone_policy_prototype_serialization(self): 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() - ) - assert ( - backup_policy_plan_clone_policy_prototype_model_json2 - == backup_policy_plan_clone_policy_prototype_model_json - ) + 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 class TestModel_BackupPolicyPlanCollection: @@ -54743,9 +55002,7 @@ def test_backup_policy_plan_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans?limit=20' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans?limit=50' zone_reference_model = {} # ZoneReference zone_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1' @@ -54756,13 +55013,11 @@ def test_backup_policy_plan_collection_serialization(self): backup_policy_plan_clone_policy_model['zones'] = [zone_reference_model] backup_policy_plan_deletion_trigger_model = {} # BackupPolicyPlanDeletionTrigger - backup_policy_plan_deletion_trigger_model['delete_after'] = 20 + backup_policy_plan_deletion_trigger_model['delete_after'] = 5 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' @@ -54775,18 +55030,16 @@ def test_backup_policy_plan_collection_serialization(self): 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['attach_user_tags'] = ['my-plan-2'] 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['created_at'] = '2024-12-04T15:16:37Z' + backup_policy_plan_model['cron_spec'] = '45 * * * *' 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_model['id'] = 'r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178' backup_policy_plan_model['lifecycle_state'] = 'stable' - backup_policy_plan_model['name'] = 'my-policy-plan' + backup_policy_plan_model['name'] = 'my-backup-plan' backup_policy_plan_model['remote_region_policies'] = [backup_policy_plan_remote_region_policy_model] backup_policy_plan_model['resource_type'] = 'backup_policy_plan' @@ -54799,15 +55052,11 @@ def test_backup_policy_plan_collection_serialization(self): 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_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 @@ -54834,18 +55083,12 @@ 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 @@ -54871,30 +55114,19 @@ def test_backup_policy_plan_deletion_trigger_patch_serialization(self): 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() - ) - assert ( - backup_policy_plan_deletion_trigger_patch_model_json2 - == backup_policy_plan_deletion_trigger_patch_model_json - ) + 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 class TestModel_BackupPolicyPlanDeletionTriggerPrototype: @@ -54913,32 +55145,19 @@ def test_backup_policy_plan_deletion_trigger_prototype_serialization(self): 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 - ) + 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() - ) - assert ( - backup_policy_plan_deletion_trigger_prototype_model_json2 - == backup_policy_plan_deletion_trigger_prototype_model_json - ) + 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 class TestModel_BackupPolicyPlanPatch: @@ -54965,9 +55184,7 @@ def test_backup_policy_plan_patch_serialization(self): 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' @@ -54986,18 +55203,14 @@ def test_backup_policy_plan_patch_serialization(self): 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['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) 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_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 @@ -55032,9 +55245,7 @@ def test_backup_policy_plan_prototype_serialization(self): 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' @@ -55051,24 +55262,16 @@ def test_backup_policy_plan_prototype_serialization(self): 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_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 @@ -55104,24 +55307,18 @@ 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'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model_json['id'] = 'r006-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' # 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_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 @@ -55157,9 +55354,7 @@ def test_backup_policy_plan_remote_serialization(self): 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_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 @@ -55183,9 +55378,7 @@ 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' @@ -55198,18 +55391,12 @@ def test_backup_policy_plan_remote_region_policy_serialization(self): 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 @@ -55232,9 +55419,7 @@ 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' @@ -55246,35 +55431,19 @@ def test_backup_policy_plan_remote_region_policy_prototype_serialization(self): 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 - ) + 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() - ) - assert ( - backup_policy_plan_remote_region_policy_prototype_model_json2 - == backup_policy_plan_remote_region_policy_prototype_model_json - ) + 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 class TestModel_BareMetalServer: @@ -55294,9 +55463,7 @@ def test_bare_metal_server_serialization(self): bare_metal_server_boot_target_model = {} # BareMetalServerBootTargetBareMetalServerDiskReference bare_metal_server_boot_target_model['deleted'] = deleted_model - bare_metal_server_boot_target_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96' - ) + bare_metal_server_boot_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96' bare_metal_server_boot_target_model['id'] = '0717-3744f199-6ccc-4698-8772-bb3937348c96' bare_metal_server_boot_target_model['name'] = 'my-bare-metal-server-disk' bare_metal_server_boot_target_model['resource_type'] = 'bare_metal_server_disk' @@ -55309,9 +55476,7 @@ def test_bare_metal_server_serialization(self): bare_metal_server_disk_model = {} # BareMetalServerDisk bare_metal_server_disk_model['created_at'] = '2024-10-23T06:09:15Z' - bare_metal_server_disk_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96' - ) + bare_metal_server_disk_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96' bare_metal_server_disk_model['id'] = '0717-3744f199-6ccc-4698-8772-bb3937348c96' bare_metal_server_disk_model['interface_type'] = 'sata' bare_metal_server_disk_model['name'] = 'my-bare-metal-server-disk' @@ -55321,69 +55486,52 @@ def test_bare_metal_server_serialization(self): bare_metal_server_firmware_model = {} # BareMetalServerFirmware bare_metal_server_firmware_model['update'] = 'none' + bare_metal_server_health_reason_model = {} # BareMetalServerHealthReason + bare_metal_server_health_reason_model['code'] = 'reservation_expired' + bare_metal_server_health_reason_model['message'] = 'The reservation cannot be used because it has expired.' + bare_metal_server_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons' + 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['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' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.0.1.5' reserved_ip_reference_model['deleted'] = deleted_model - reserved_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - ) + reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/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['name'] = 'my-reserved-ip-z1' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' 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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) - virtual_network_interface_reference_attachment_context_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) + 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + virtual_network_interface_reference_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' virtual_network_interface_reference_attachment_context_model['id'] = '0717-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' bare_metal_server_network_attachment_reference_model = {} # BareMetalServerNetworkAttachmentReference bare_metal_server_network_attachment_reference_model['deleted'] = deleted_model - bare_metal_server_network_attachment_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - ) + bare_metal_server_network_attachment_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' bare_metal_server_network_attachment_reference_model['id'] = '0717-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 - bare_metal_server_network_attachment_reference_model['virtual_network_interface'] = ( - virtual_network_interface_reference_attachment_context_model - ) + bare_metal_server_network_attachment_reference_model['virtual_network_interface'] = virtual_network_interface_reference_attachment_context_model - network_interface_bare_metal_server_context_reference_model = ( - {} - ) # NetworkInterfaceBareMetalServerContextReference + network_interface_bare_metal_server_context_reference_model = {} # NetworkInterfaceBareMetalServerContextReference network_interface_bare_metal_server_context_reference_model['deleted'] = deleted_model - network_interface_bare_metal_server_context_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - ) + network_interface_bare_metal_server_context_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' network_interface_bare_metal_server_context_reference_model['id'] = '0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' 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 @@ -55391,27 +55539,31 @@ def test_bare_metal_server_serialization(self): 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/bx2-metal-192x768' - ) + bare_metal_server_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_server/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' + reservation_reference_model = {} # ReservationReference + reservation_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_reference_model['deleted'] = deleted_model + reservation_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_reference_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_reference_model['name'] = 'my-reservation' + reservation_reference_model['resource_type'] = 'reservation' + + bare_metal_server_reservation_affinity_model = {} # BareMetalServerReservationAffinity + bare_metal_server_reservation_affinity_model['policy'] = 'disabled' + bare_metal_server_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['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'Default' 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_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 @@ -55419,13 +55571,9 @@ def test_bare_metal_server_serialization(self): bare_metal_server_trusted_platform_module_model['supported_modes'] = ['disabled', 'tpm_2'] 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'] = 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' @@ -55440,31 +55588,25 @@ def test_bare_metal_server_serialization(self): 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:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304' - ) + bare_metal_server_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304' 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['firmware'] = bare_metal_server_firmware_model - bare_metal_server_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304' - ) + bare_metal_server_model_json['health_reasons'] = [bare_metal_server_health_reason_model] + bare_metal_server_model_json['health_state'] = 'ok' + bare_metal_server_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304' bare_metal_server_model_json['id'] = '0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304' 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['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['reservation'] = reservation_reference_model + bare_metal_server_model_json['reservation_affinity'] = bare_metal_server_reservation_affinity_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' @@ -55539,9 +55681,7 @@ def test_bare_metal_server_collection_serialization(self): bare_metal_server_boot_target_model = {} # BareMetalServerBootTargetBareMetalServerDiskReference bare_metal_server_boot_target_model['deleted'] = deleted_model - bare_metal_server_boot_target_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96' - ) + bare_metal_server_boot_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96' bare_metal_server_boot_target_model['id'] = '0717-3744f199-6ccc-4698-8772-bb3937348c96' bare_metal_server_boot_target_model['name'] = 'my-bare-metal-server-disk' bare_metal_server_boot_target_model['resource_type'] = 'bare_metal_server_disk' @@ -55554,9 +55694,7 @@ def test_bare_metal_server_collection_serialization(self): bare_metal_server_disk_model = {} # BareMetalServerDisk bare_metal_server_disk_model['created_at'] = '2024-10-23T06:09:15Z' - bare_metal_server_disk_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96' - ) + bare_metal_server_disk_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96' bare_metal_server_disk_model['id'] = '0717-3744f199-6ccc-4698-8772-bb3937348c96' bare_metal_server_disk_model['interface_type'] = 'sata' bare_metal_server_disk_model['name'] = 'my-bare-metal-server-disk' @@ -55566,69 +55704,52 @@ def test_bare_metal_server_collection_serialization(self): bare_metal_server_firmware_model = {} # BareMetalServerFirmware bare_metal_server_firmware_model['update'] = 'none' + bare_metal_server_health_reason_model = {} # BareMetalServerHealthReason + bare_metal_server_health_reason_model['code'] = 'reservation_expired' + bare_metal_server_health_reason_model['message'] = 'The reservation cannot be used because it has expired.' + bare_metal_server_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons' + 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['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' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.0.1.5' reserved_ip_reference_model['deleted'] = deleted_model - reserved_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - ) + reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/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['name'] = 'my-reserved-ip-z1' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' 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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) - virtual_network_interface_reference_attachment_context_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) + 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + virtual_network_interface_reference_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' virtual_network_interface_reference_attachment_context_model['id'] = '0717-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' bare_metal_server_network_attachment_reference_model = {} # BareMetalServerNetworkAttachmentReference bare_metal_server_network_attachment_reference_model['deleted'] = deleted_model - bare_metal_server_network_attachment_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - ) + bare_metal_server_network_attachment_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' bare_metal_server_network_attachment_reference_model['id'] = '0717-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 - bare_metal_server_network_attachment_reference_model['virtual_network_interface'] = ( - virtual_network_interface_reference_attachment_context_model - ) + bare_metal_server_network_attachment_reference_model['virtual_network_interface'] = virtual_network_interface_reference_attachment_context_model - network_interface_bare_metal_server_context_reference_model = ( - {} - ) # NetworkInterfaceBareMetalServerContextReference + network_interface_bare_metal_server_context_reference_model = {} # NetworkInterfaceBareMetalServerContextReference network_interface_bare_metal_server_context_reference_model['deleted'] = deleted_model - network_interface_bare_metal_server_context_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - ) + network_interface_bare_metal_server_context_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' network_interface_bare_metal_server_context_reference_model['id'] = '0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' 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 @@ -55636,27 +55757,31 @@ def test_bare_metal_server_collection_serialization(self): 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/bx2-metal-192x768' - ) + bare_metal_server_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_server/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' + reservation_reference_model = {} # ReservationReference + reservation_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_reference_model['deleted'] = deleted_model + reservation_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_reference_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_reference_model['name'] = 'my-reservation' + reservation_reference_model['resource_type'] = 'reservation' + + bare_metal_server_reservation_affinity_model = {} # BareMetalServerReservationAffinity + bare_metal_server_reservation_affinity_model['policy'] = 'disabled' + bare_metal_server_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['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'Default' 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_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 @@ -55664,13 +55789,9 @@ def test_bare_metal_server_collection_serialization(self): bare_metal_server_trusted_platform_module_model['supported_modes'] = ['disabled', 'tpm_2'] 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'] = 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' @@ -55684,15 +55805,13 @@ def test_bare_metal_server_collection_serialization(self): 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'] = '2024-10-22T06:09:15Z' - bare_metal_server_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304' - ) + bare_metal_server_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::bare-metal-server:0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304' bare_metal_server_model['disks'] = [bare_metal_server_disk_model] bare_metal_server_model['enable_secure_boot'] = False bare_metal_server_model['firmware'] = bare_metal_server_firmware_model - bare_metal_server_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304' - ) + bare_metal_server_model['health_reasons'] = [bare_metal_server_health_reason_model] + bare_metal_server_model['health_state'] = 'ok' + bare_metal_server_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304' bare_metal_server_model['id'] = '0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304' bare_metal_server_model['lifecycle_reasons'] = [bare_metal_server_lifecycle_reason_model] bare_metal_server_model['lifecycle_state'] = 'stable' @@ -55701,10 +55820,10 @@ def test_bare_metal_server_collection_serialization(self): 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['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['reservation'] = reservation_reference_model + bare_metal_server_model['reservation_affinity'] = bare_metal_server_reservation_affinity_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'] = 'running' @@ -55725,15 +55844,11 @@ def test_bare_metal_server_collection_serialization(self): 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_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 @@ -55756,30 +55871,20 @@ 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'] = ( - 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50IjoiYWEyNDMyYjFmYTRkNGFjZTg5MWU5YjgwZmMxMDRlMzQiLCJzZWNyZXQiOiJRVzRnWlhoaGJYQnNaU0J6WldOeVpYUUsiLCJleHAiOjE3MjYwNzU1OTR9.UFDVzzGJ54Go9Z4jgyPSLG49zNx-AjHTQrJA6ee8KLI' - ) + bare_metal_server_console_access_token_model_json['access_token'] = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50IjoiYWEyNDMyYjFmYTRkNGFjZTg5MWU5YjgwZmMxMDRlMzQiLCJzZWNyZXQiOiJRVzRnWlhoaGJYQnNaU0J6WldOeVpYUUsiLCJleHAiOjE3MjYwNzU1OTR9.UFDVzzGJ54Go9Z4jgyPSLG49zNx-AjHTQrJA6ee8KLI' 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/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/console?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50IjoiYWEyNDMyYjFmYTRkNGFjZTg5MWU5YjgwZmMxMDRlMzQiLCJzZWNyZXQiOiJRVzRnWlhoaGJYQnNaU0J6WldOeVpYUUsiLCJleHAiOjE3MjYwNzU1OTR9.UFDVzzGJ54Go9Z4jgyPSLG49zNx-AjHTQrJA6ee8KLI' - ) + bare_metal_server_console_access_token_model_json['href'] = 'wss://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/console?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50IjoiYWEyNDMyYjFmYTRkNGFjZTg5MWU5YjgwZmMxMDRlMzQiLCJzZWNyZXQiOiJRVzRnWlhoaGJYQnNaU0J6WldOeVpYUUsiLCJleHAiOjE3MjYwNzU1OTR9.UFDVzzGJ54Go9Z4jgyPSLG49zNx-AjHTQrJA6ee8KLI' # 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 @@ -55802,9 +55907,7 @@ 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/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96' - ) + bare_metal_server_disk_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96' 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' @@ -55841,9 +55944,7 @@ def test_bare_metal_server_disk_collection_serialization(self): bare_metal_server_disk_model = {} # BareMetalServerDisk bare_metal_server_disk_model['created_at'] = '2024-10-23T06:09:15Z' - bare_metal_server_disk_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96' - ) + bare_metal_server_disk_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96' bare_metal_server_disk_model['id'] = '0717-3744f199-6ccc-4698-8772-bb3937348c96' bare_metal_server_disk_model['interface_type'] = 'sata' bare_metal_server_disk_model['name'] = 'my-bare-metal-server-disk' @@ -55855,18 +55956,12 @@ def test_bare_metal_server_disk_collection_serialization(self): 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 @@ -55895,9 +55990,7 @@ def test_bare_metal_server_disk_patch_serialization(self): 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_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 @@ -55927,9 +56020,7 @@ def test_bare_metal_server_firmware_serialization(self): assert bare_metal_server_firmware_model != False # Construct a model instance of BareMetalServerFirmware by calling from_dict on the json representation - bare_metal_server_firmware_model_dict = BareMetalServerFirmware.from_dict( - bare_metal_server_firmware_model_json - ).__dict__ + bare_metal_server_firmware_model_dict = BareMetalServerFirmware.from_dict(bare_metal_server_firmware_model_json).__dict__ bare_metal_server_firmware_model2 = BareMetalServerFirmware(**bare_metal_server_firmware_model_dict) # Verify the model instances are equivalent @@ -55940,6 +56031,38 @@ def test_bare_metal_server_firmware_serialization(self): assert bare_metal_server_firmware_model_json2 == bare_metal_server_firmware_model_json +class TestModel_BareMetalServerHealthReason: + """ + Test Class for BareMetalServerHealthReason + """ + + def test_bare_metal_server_health_reason_serialization(self): + """ + Test serialization/deserialization for BareMetalServerHealthReason + """ + + # Construct a json representation of a BareMetalServerHealthReason model + bare_metal_server_health_reason_model_json = {} + bare_metal_server_health_reason_model_json['code'] = 'reservation_expired' + bare_metal_server_health_reason_model_json['message'] = 'The reservation cannot be used because it has expired.' + bare_metal_server_health_reason_model_json['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons' + + # Construct a model instance of BareMetalServerHealthReason by calling from_dict on the json representation + bare_metal_server_health_reason_model = BareMetalServerHealthReason.from_dict(bare_metal_server_health_reason_model_json) + assert bare_metal_server_health_reason_model != False + + # Construct a model instance of BareMetalServerHealthReason by calling from_dict on the json representation + bare_metal_server_health_reason_model_dict = BareMetalServerHealthReason.from_dict(bare_metal_server_health_reason_model_json).__dict__ + bare_metal_server_health_reason_model2 = BareMetalServerHealthReason(**bare_metal_server_health_reason_model_dict) + + # Verify the model instances are equivalent + assert bare_metal_server_health_reason_model == bare_metal_server_health_reason_model2 + + # Convert model instance back to dict and verify no loss of data + bare_metal_server_health_reason_model_json2 = bare_metal_server_health_reason_model.to_dict() + assert bare_metal_server_health_reason_model_json2 == bare_metal_server_health_reason_model_json + + class TestModel_BareMetalServerInitialization: """ Test Class for BareMetalServerInitialization @@ -55968,36 +56091,24 @@ 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'] = deleted_model - image_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/images/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_model = {} # KeyReference - key_reference_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45' - ) + key_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45' key_reference_model['deleted'] = deleted_model key_reference_model['fingerprint'] = 'SHA256:RJ+YWs2kupwFGiJuLqY85twmcdLOUcjIc9cA6IR8n8E' - key_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45' - ) + key_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45' key_reference_model['id'] = 'r006-82679077-ac3b-4c10-be16-63e9c21f0f45' key_reference_model['name'] = 'my-key-1' - 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 = {} # 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'] = 'root' @@ -56006,23 +56117,15 @@ def test_bare_metal_server_initialization_serialization(self): 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['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 @@ -56057,30 +56160,19 @@ def test_bare_metal_server_initialization_prototype_serialization(self): 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() - ) - assert ( - bare_metal_server_initialization_prototype_model_json2 - == bare_metal_server_initialization_prototype_model_json - ) + 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 class TestModel_BareMetalServerLifecycleReason: @@ -56096,26 +56188,16 @@ 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['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 @@ -56138,9 +56220,7 @@ def test_bare_metal_server_network_attachment_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6?limit=20' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6?limit=20' deleted_model = {} # Deleted deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' @@ -56148,43 +56228,29 @@ def test_bare_metal_server_network_attachment_collection_serialization(self): reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.0.1.5' reserved_ip_reference_model['deleted'] = deleted_model - reserved_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - ) + reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/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['name'] = 'my-reserved-ip-z1' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' 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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) - virtual_network_interface_reference_attachment_context_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) + 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + virtual_network_interface_reference_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' virtual_network_interface_reference_attachment_context_model['id'] = '0717-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' bare_metal_server_network_attachment_model = {} # BareMetalServerNetworkAttachmentByVLAN bare_metal_server_network_attachment_model['created_at'] = '2024-10-23T03:42:32.993000Z' - bare_metal_server_network_attachment_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - ) + bare_metal_server_network_attachment_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' bare_metal_server_network_attachment_model['id'] = '0717-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' @@ -56193,9 +56259,7 @@ def test_bare_metal_server_network_attachment_collection_serialization(self): 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['allow_to_float'] = False bare_metal_server_network_attachment_model['interface_type'] = 'vlan' bare_metal_server_network_attachment_model['vlan'] = 4 @@ -56204,42 +56268,24 @@ def test_bare_metal_server_network_attachment_collection_serialization(self): bare_metal_server_network_attachment_collection_model_json = {} bare_metal_server_network_attachment_collection_model_json['first'] = page_link_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['network_attachments'] = [bare_metal_server_network_attachment_model] bare_metal_server_network_attachment_collection_model_json['next'] = page_link_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 - ) + 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() - ) - assert ( - bare_metal_server_network_attachment_collection_model_json2 - == bare_metal_server_network_attachment_collection_model_json - ) + 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 class TestModel_BareMetalServerNetworkAttachmentPatch: @@ -56255,35 +56301,22 @@ 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['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() - ) - assert ( - bare_metal_server_network_attachment_patch_model_json2 - == bare_metal_server_network_attachment_patch_model_json - ) + 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 class TestModel_BareMetalServerNetworkAttachmentReference: @@ -56304,34 +56337,22 @@ def test_bare_metal_server_network_attachment_reference_serialization(self): reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.0.1.5' reserved_ip_reference_model['deleted'] = deleted_model - reserved_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - ) + reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/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['name'] = 'my-reserved-ip-z1' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' 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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) - virtual_network_interface_reference_attachment_context_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) + 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + virtual_network_interface_reference_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' virtual_network_interface_reference_attachment_context_model['id'] = '0717-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' @@ -56339,48 +56360,28 @@ def test_bare_metal_server_network_attachment_reference_serialization(self): # 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'] = deleted_model - bare_metal_server_network_attachment_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - ) + bare_metal_server_network_attachment_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' bare_metal_server_network_attachment_reference_model_json['id'] = '0717-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['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['virtual_network_interface'] = ( - virtual_network_interface_reference_attachment_context_model - ) + bare_metal_server_network_attachment_reference_model_json['virtual_network_interface'] = virtual_network_interface_reference_attachment_context_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 - ) + 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() - ) - assert ( - bare_metal_server_network_attachment_reference_model_json2 - == bare_metal_server_network_attachment_reference_model_json - ) + 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 class TestModel_BareMetalServerNetworkInterfaceCollection: @@ -56396,54 +56397,38 @@ def test_bare_metal_server_network_interface_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304?limit=20' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304?limit=20' deleted_model = {} # Deleted 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:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) + floating_ip_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' floating_ip_reference_model['deleted'] = deleted_model - floating_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) + floating_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' floating_ip_reference_model['id'] = 'r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' floating_ip_reference_model['name'] = 'my-floating-ip' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.0.1.5' reserved_ip_reference_model['deleted'] = deleted_model - reserved_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - ) + reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/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['name'] = 'my-reserved-ip-z1' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_reference_model['deleted'] = 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['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_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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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' @@ -56453,9 +56438,7 @@ def test_bare_metal_server_network_interface_collection_serialization(self): bare_metal_server_network_interface_model['created_at'] = '2021-05-21T06:09:15Z' bare_metal_server_network_interface_model['enable_infrastructure_nat'] = False 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/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - ) + bare_metal_server_network_interface_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' bare_metal_server_network_interface_model['id'] = '0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' bare_metal_server_network_interface_model['mac_address'] = '02:09:04:00:C4:6A' bare_metal_server_network_interface_model['name'] = 'my-primary-network-interface' @@ -56473,40 +56456,24 @@ def test_bare_metal_server_network_interface_collection_serialization(self): bare_metal_server_network_interface_collection_model_json = {} bare_metal_server_network_interface_collection_model_json['first'] = page_link_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['network_interfaces'] = [bare_metal_server_network_interface_model] bare_metal_server_network_interface_collection_model_json['next'] = page_link_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 - ) + 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() - ) - assert ( - bare_metal_server_network_interface_collection_model_json2 - == bare_metal_server_network_interface_collection_model_json - ) + 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 class TestModel_BareMetalServerNetworkInterfacePatch: @@ -56527,30 +56494,19 @@ def test_bare_metal_server_network_interface_patch_serialization(self): 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() - ) - assert ( - bare_metal_server_network_interface_patch_model_json2 - == bare_metal_server_network_interface_patch_model_json - ) + 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 class TestModel_BareMetalServerPatch: @@ -56565,6 +56521,13 @@ def test_bare_metal_server_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'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' + + bare_metal_server_reservation_affinity_patch_model = {} # BareMetalServerReservationAffinityPatch + bare_metal_server_reservation_affinity_patch_model['policy'] = 'automatic' + bare_metal_server_reservation_affinity_patch_model['pool'] = [reservation_identity_model] + bare_metal_server_trusted_platform_module_patch_model = {} # BareMetalServerTrustedPlatformModulePatch bare_metal_server_trusted_platform_module_patch_model['mode'] = 'disabled' @@ -56573,9 +56536,8 @@ def test_bare_metal_server_patch_serialization(self): 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['reservation_affinity'] = bare_metal_server_reservation_affinity_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) @@ -56605,9 +56567,7 @@ def test_bare_metal_server_primary_network_interface_prototype_serialization(sel # 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' @@ -56624,49 +56584,25 @@ def test_bare_metal_server_primary_network_interface_prototype_serialization(sel 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['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 - ) + 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() - ) - assert ( - bare_metal_server_primary_network_interface_prototype_model_json2 - == bare_metal_server_primary_network_interface_prototype_model_json - ) + 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 class TestModel_BareMetalServerProfile: @@ -56718,17 +56654,13 @@ def test_bare_metal_server_profile_serialization(self): 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_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'] = 768 - 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' @@ -56743,16 +56675,16 @@ def test_bare_metal_server_profile_serialization(self): 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_reservation_terms_model = {} # BareMetalServerProfileReservationTerms + bare_metal_server_profile_reservation_terms_model['type'] = 'enum' + bare_metal_server_profile_reservation_terms_model['values'] = ['one_year', 'three_year'] + + 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', 'tpm_2'] - bare_metal_server_profile_virtual_network_interfaces_supported_model = ( - {} - ) # BareMetalServerProfileVirtualNetworkInterfacesSupported + 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 @@ -56765,34 +56697,23 @@ def test_bare_metal_server_profile_serialization(self): 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['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['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['reservation_terms'] = bare_metal_server_profile_reservation_terms_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['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) 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_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 @@ -56820,30 +56741,19 @@ def test_bare_metal_server_profile_cpu_architecture_serialization(self): 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() - ) - assert ( - bare_metal_server_profile_cpu_architecture_model_json2 - == bare_metal_server_profile_cpu_architecture_model_json - ) + 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 class TestModel_BareMetalServerProfileCollection: @@ -56859,9 +56769,7 @@ def test_bare_metal_server_profile_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_server/profiles/bx2d-metal-192x768?limit=50' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_server/profiles/bx2d-metal-192x768?limit=50' bare_metal_server_profile_bandwidth_model = {} # BareMetalServerProfileBandwidthFixed bare_metal_server_profile_bandwidth_model['type'] = 'fixed' @@ -56900,17 +56808,13 @@ def test_bare_metal_server_profile_collection_serialization(self): 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_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'] = 768 - 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' @@ -56925,16 +56829,16 @@ def test_bare_metal_server_profile_collection_serialization(self): 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_reservation_terms_model = {} # BareMetalServerProfileReservationTerms + bare_metal_server_profile_reservation_terms_model['type'] = 'enum' + bare_metal_server_profile_reservation_terms_model['values'] = ['one_year', 'three_year'] + + 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', 'tpm_2'] - bare_metal_server_profile_virtual_network_interfaces_supported_model = ( - {} - ) # BareMetalServerProfileVirtualNetworkInterfacesSupported + 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 @@ -56946,25 +56850,16 @@ def test_bare_metal_server_profile_collection_serialization(self): 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_server/profiles/bx2-metal-192x768' - ) + bare_metal_server_profile_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_server/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['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['reservation_terms'] = bare_metal_server_profile_reservation_terms_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['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 = {} @@ -56975,18 +56870,12 @@ def test_bare_metal_server_profile_collection_serialization(self): 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 @@ -57012,18 +56901,12 @@ def test_bare_metal_server_profile_console_types_serialization(self): 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 @@ -57062,20 +56945,14 @@ def test_bare_metal_server_profile_disk_serialization(self): 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['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_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 @@ -57103,37 +56980,19 @@ def test_bare_metal_server_profile_disk_supported_interfaces_serialization(self) 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 - ) + 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() - ) - assert ( - bare_metal_server_profile_disk_supported_interfaces_model_json2 - == bare_metal_server_profile_disk_supported_interfaces_model_json - ) + 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 class TestModel_BareMetalServerProfileOSArchitecture: @@ -57153,30 +57012,19 @@ def test_bare_metal_server_profile_os_architecture_serialization(self): 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() - ) - assert ( - bare_metal_server_profile_os_architecture_model_json2 - == bare_metal_server_profile_os_architecture_model_json - ) + 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 class TestModel_BareMetalServerProfileReference: @@ -57191,25 +57039,17 @@ 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['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 @@ -57219,6 +57059,37 @@ def test_bare_metal_server_profile_reference_serialization(self): assert bare_metal_server_profile_reference_model_json2 == bare_metal_server_profile_reference_model_json +class TestModel_BareMetalServerProfileReservationTerms: + """ + Test Class for BareMetalServerProfileReservationTerms + """ + + def test_bare_metal_server_profile_reservation_terms_serialization(self): + """ + Test serialization/deserialization for BareMetalServerProfileReservationTerms + """ + + # Construct a json representation of a BareMetalServerProfileReservationTerms model + bare_metal_server_profile_reservation_terms_model_json = {} + bare_metal_server_profile_reservation_terms_model_json['type'] = 'enum' + bare_metal_server_profile_reservation_terms_model_json['values'] = ['one_year', 'three_year'] + + # Construct a model instance of BareMetalServerProfileReservationTerms by calling from_dict on the json representation + bare_metal_server_profile_reservation_terms_model = BareMetalServerProfileReservationTerms.from_dict(bare_metal_server_profile_reservation_terms_model_json) + assert bare_metal_server_profile_reservation_terms_model != False + + # Construct a model instance of BareMetalServerProfileReservationTerms by calling from_dict on the json representation + bare_metal_server_profile_reservation_terms_model_dict = BareMetalServerProfileReservationTerms.from_dict(bare_metal_server_profile_reservation_terms_model_json).__dict__ + bare_metal_server_profile_reservation_terms_model2 = BareMetalServerProfileReservationTerms(**bare_metal_server_profile_reservation_terms_model_dict) + + # Verify the model instances are equivalent + assert bare_metal_server_profile_reservation_terms_model == bare_metal_server_profile_reservation_terms_model2 + + # Convert model instance back to dict and verify no loss of data + bare_metal_server_profile_reservation_terms_model_json2 = bare_metal_server_profile_reservation_terms_model.to_dict() + assert bare_metal_server_profile_reservation_terms_model_json2 == bare_metal_server_profile_reservation_terms_model_json + + class TestModel_BareMetalServerProfileSupportedTrustedPlatformModuleModes: """ Test Class for BareMetalServerProfileSupportedTrustedPlatformModuleModes @@ -57236,39 +57107,19 @@ def test_bare_metal_server_profile_supported_trusted_platform_module_modes_seria 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 - ) + 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() - ) - assert ( - bare_metal_server_profile_supported_trusted_platform_module_modes_model_json2 - == bare_metal_server_profile_supported_trusted_platform_module_modes_model_json - ) + 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 class TestModel_BareMetalServerProfileVirtualNetworkInterfacesSupported: @@ -57287,39 +57138,135 @@ def test_bare_metal_server_profile_virtual_network_interfaces_supported_serializ 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 - ) + 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() - ) - assert ( - bare_metal_server_profile_virtual_network_interfaces_supported_model_json2 - == bare_metal_server_profile_virtual_network_interfaces_supported_model_json - ) + 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 + + +class TestModel_BareMetalServerReservationAffinity: + """ + Test Class for BareMetalServerReservationAffinity + """ + + def test_bare_metal_server_reservation_affinity_serialization(self): + """ + Test serialization/deserialization for BareMetalServerReservationAffinity + """ + + # Construct dict forms of any model objects needed in order to build this model. + + deleted_model = {} # Deleted + 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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_reference_model['deleted'] = deleted_model + reservation_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_reference_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_reference_model['name'] = 'my-reservation' + reservation_reference_model['resource_type'] = 'reservation' + + # Construct a json representation of a BareMetalServerReservationAffinity model + bare_metal_server_reservation_affinity_model_json = {} + bare_metal_server_reservation_affinity_model_json['policy'] = 'automatic' + bare_metal_server_reservation_affinity_model_json['pool'] = [reservation_reference_model] + + # Construct a model instance of BareMetalServerReservationAffinity by calling from_dict on the json representation + bare_metal_server_reservation_affinity_model = BareMetalServerReservationAffinity.from_dict(bare_metal_server_reservation_affinity_model_json) + assert bare_metal_server_reservation_affinity_model != False + + # Construct a model instance of BareMetalServerReservationAffinity by calling from_dict on the json representation + bare_metal_server_reservation_affinity_model_dict = BareMetalServerReservationAffinity.from_dict(bare_metal_server_reservation_affinity_model_json).__dict__ + bare_metal_server_reservation_affinity_model2 = BareMetalServerReservationAffinity(**bare_metal_server_reservation_affinity_model_dict) + + # Verify the model instances are equivalent + assert bare_metal_server_reservation_affinity_model == bare_metal_server_reservation_affinity_model2 + + # Convert model instance back to dict and verify no loss of data + bare_metal_server_reservation_affinity_model_json2 = bare_metal_server_reservation_affinity_model.to_dict() + assert bare_metal_server_reservation_affinity_model_json2 == bare_metal_server_reservation_affinity_model_json + + +class TestModel_BareMetalServerReservationAffinityPatch: + """ + Test Class for BareMetalServerReservationAffinityPatch + """ + + def test_bare_metal_server_reservation_affinity_patch_serialization(self): + """ + Test serialization/deserialization for BareMetalServerReservationAffinityPatch + """ + + # Construct dict forms of any model objects needed in order to build this model. + + reservation_identity_model = {} # ReservationIdentityById + reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' + + # Construct a json representation of a BareMetalServerReservationAffinityPatch model + bare_metal_server_reservation_affinity_patch_model_json = {} + bare_metal_server_reservation_affinity_patch_model_json['policy'] = 'automatic' + bare_metal_server_reservation_affinity_patch_model_json['pool'] = [reservation_identity_model] + + # Construct a model instance of BareMetalServerReservationAffinityPatch by calling from_dict on the json representation + bare_metal_server_reservation_affinity_patch_model = BareMetalServerReservationAffinityPatch.from_dict(bare_metal_server_reservation_affinity_patch_model_json) + assert bare_metal_server_reservation_affinity_patch_model != False + + # Construct a model instance of BareMetalServerReservationAffinityPatch by calling from_dict on the json representation + bare_metal_server_reservation_affinity_patch_model_dict = BareMetalServerReservationAffinityPatch.from_dict(bare_metal_server_reservation_affinity_patch_model_json).__dict__ + bare_metal_server_reservation_affinity_patch_model2 = BareMetalServerReservationAffinityPatch(**bare_metal_server_reservation_affinity_patch_model_dict) + + # Verify the model instances are equivalent + assert bare_metal_server_reservation_affinity_patch_model == bare_metal_server_reservation_affinity_patch_model2 + + # Convert model instance back to dict and verify no loss of data + bare_metal_server_reservation_affinity_patch_model_json2 = bare_metal_server_reservation_affinity_patch_model.to_dict() + assert bare_metal_server_reservation_affinity_patch_model_json2 == bare_metal_server_reservation_affinity_patch_model_json + + +class TestModel_BareMetalServerReservationAffinityPrototype: + """ + Test Class for BareMetalServerReservationAffinityPrototype + """ + + def test_bare_metal_server_reservation_affinity_prototype_serialization(self): + """ + Test serialization/deserialization for BareMetalServerReservationAffinityPrototype + """ + + # Construct dict forms of any model objects needed in order to build this model. + + reservation_identity_model = {} # ReservationIdentityById + reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' + + # Construct a json representation of a BareMetalServerReservationAffinityPrototype model + bare_metal_server_reservation_affinity_prototype_model_json = {} + bare_metal_server_reservation_affinity_prototype_model_json['policy'] = 'automatic' + bare_metal_server_reservation_affinity_prototype_model_json['pool'] = [reservation_identity_model] + + # Construct a model instance of BareMetalServerReservationAffinityPrototype by calling from_dict on the json representation + bare_metal_server_reservation_affinity_prototype_model = BareMetalServerReservationAffinityPrototype.from_dict(bare_metal_server_reservation_affinity_prototype_model_json) + assert bare_metal_server_reservation_affinity_prototype_model != False + + # Construct a model instance of BareMetalServerReservationAffinityPrototype by calling from_dict on the json representation + bare_metal_server_reservation_affinity_prototype_model_dict = BareMetalServerReservationAffinityPrototype.from_dict(bare_metal_server_reservation_affinity_prototype_model_json).__dict__ + bare_metal_server_reservation_affinity_prototype_model2 = BareMetalServerReservationAffinityPrototype(**bare_metal_server_reservation_affinity_prototype_model_dict) + + # Verify the model instances are equivalent + assert bare_metal_server_reservation_affinity_prototype_model == bare_metal_server_reservation_affinity_prototype_model2 + + # Convert model instance back to dict and verify no loss of data + bare_metal_server_reservation_affinity_prototype_model_json2 = bare_metal_server_reservation_affinity_prototype_model.to_dict() + assert bare_metal_server_reservation_affinity_prototype_model_json2 == bare_metal_server_reservation_affinity_prototype_model_json class TestModel_BareMetalServerStatusReason: @@ -57335,26 +57282,16 @@ 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['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 @@ -57381,30 +57318,19 @@ def test_bare_metal_server_trusted_platform_module_serialization(self): 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() - ) - assert ( - bare_metal_server_trusted_platform_module_model_json2 - == bare_metal_server_trusted_platform_module_model_json - ) + 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 class TestModel_BareMetalServerTrustedPlatformModulePatch: @@ -57422,35 +57348,19 @@ def test_bare_metal_server_trusted_platform_module_patch_serialization(self): 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 - ) + 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() - ) - assert ( - bare_metal_server_trusted_platform_module_patch_model_json2 - == bare_metal_server_trusted_platform_module_patch_model_json - ) + 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 class TestModel_BareMetalServerTrustedPlatformModulePrototype: @@ -57468,37 +57378,19 @@ def test_bare_metal_server_trusted_platform_module_prototype_serialization(self) 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 - ) + 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() - ) - assert ( - bare_metal_server_trusted_platform_module_prototype_model_json2 - == bare_metal_server_trusted_platform_module_prototype_model_json - ) + 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: @@ -57518,24 +57410,16 @@ def test_catalog_offering_version_plan_reference_serialization(self): # 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['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'] = 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 - ) + 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 - ) + 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 @@ -57557,23 +57441,15 @@ 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 @@ -57595,23 +57471,15 @@ 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 @@ -57633,24 +57501,16 @@ 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['crn'] = 'crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:bucket-27200-lwx4cfvcue' 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 @@ -57675,18 +57535,12 @@ 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 @@ -57710,22 +57564,16 @@ def test_cluster_network_serialization(self): cluster_network_lifecycle_reason_model = {} # ClusterNetworkLifecycleReason cluster_network_lifecycle_reason_model['code'] = 'resource_suspended_by_provider' - cluster_network_lifecycle_reason_model['message'] = ( - 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - ) + cluster_network_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' cluster_network_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' cluster_network_profile_reference_model = {} # ClusterNetworkProfileReference - cluster_network_profile_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100' - ) + cluster_network_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100' cluster_network_profile_reference_model['name'] = 'h100' cluster_network_profile_reference_model['resource_type'] = 'cluster_network_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['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'Default' @@ -57737,13 +57585,9 @@ def test_cluster_network_serialization(self): 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'] = 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' @@ -57755,12 +57599,8 @@ def test_cluster_network_serialization(self): # Construct a json representation of a ClusterNetwork model cluster_network_model_json = {} cluster_network_model_json['created_at'] = '2019-01-01T12:00:00Z' - cluster_network_model_json['crn'] = ( - 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573' - ) - cluster_network_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573' - ) + cluster_network_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573' + cluster_network_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573' cluster_network_model_json['id'] = '0717-da0df18c-7598-4633-a648-fdaac28a5573' cluster_network_model_json['lifecycle_reasons'] = [cluster_network_lifecycle_reason_model] cluster_network_model_json['lifecycle_state'] = 'stable' @@ -57802,22 +57642,16 @@ def test_cluster_network_collection_serialization(self): cluster_network_lifecycle_reason_model = {} # ClusterNetworkLifecycleReason cluster_network_lifecycle_reason_model['code'] = 'resource_suspended_by_provider' - cluster_network_lifecycle_reason_model['message'] = ( - 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - ) + cluster_network_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' cluster_network_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' cluster_network_profile_reference_model = {} # ClusterNetworkProfileReference - cluster_network_profile_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100' - ) + cluster_network_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100' cluster_network_profile_reference_model['name'] = 'h100' cluster_network_profile_reference_model['resource_type'] = 'cluster_network_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['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'Default' @@ -57829,13 +57663,9 @@ def test_cluster_network_collection_serialization(self): 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'] = 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' @@ -57846,12 +57676,8 @@ def test_cluster_network_collection_serialization(self): cluster_network_model = {} # ClusterNetwork cluster_network_model['created_at'] = '2024-10-28T11:59:46Z' - cluster_network_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573' - ) - cluster_network_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573' - ) + cluster_network_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573' + cluster_network_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573' cluster_network_model['id'] = '0717-da0df18c-7598-4633-a648-fdaac28a5573' cluster_network_model['lifecycle_reasons'] = [cluster_network_lifecycle_reason_model] cluster_network_model['lifecycle_state'] = 'stable' @@ -57879,9 +57705,7 @@ def test_cluster_network_collection_serialization(self): assert cluster_network_collection_model != False # Construct a model instance of ClusterNetworkCollection by calling from_dict on the json representation - cluster_network_collection_model_dict = ClusterNetworkCollection.from_dict( - cluster_network_collection_model_json - ).__dict__ + cluster_network_collection_model_dict = ClusterNetworkCollection.from_dict(cluster_network_collection_model_json).__dict__ cluster_network_collection_model2 = ClusterNetworkCollection(**cluster_network_collection_model_dict) # Verify the model instances are equivalent @@ -57906,12 +57730,8 @@ def test_cluster_network_interface_serialization(self): cluster_network_interface_lifecycle_reason_model = {} # ClusterNetworkInterfaceLifecycleReason cluster_network_interface_lifecycle_reason_model['code'] = 'resource_suspended_by_provider' - cluster_network_interface_lifecycle_reason_model['message'] = ( - 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - ) - cluster_network_interface_lifecycle_reason_model['more_info'] = ( - 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' - ) + cluster_network_interface_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + cluster_network_interface_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' deleted_model = {} # Deleted deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' @@ -57919,40 +57739,28 @@ def test_cluster_network_interface_serialization(self): cluster_network_subnet_reserved_ip_reference_model = {} # ClusterNetworkSubnetReservedIPReference cluster_network_subnet_reserved_ip_reference_model['address'] = '10.1.0.6' cluster_network_subnet_reserved_ip_reference_model['deleted'] = deleted_model - cluster_network_subnet_reserved_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/63341ffa-1037-4b50-be40-676e3e9ac0c7' - ) + cluster_network_subnet_reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/63341ffa-1037-4b50-be40-676e3e9ac0c7' cluster_network_subnet_reserved_ip_reference_model['id'] = '63341ffa-1037-4b50-be40-676e3e9ac0c7' cluster_network_subnet_reserved_ip_reference_model['name'] = 'my-cluster-network-subnet-reserved-ip' cluster_network_subnet_reserved_ip_reference_model['resource_type'] = 'cluster_network_subnet_reserved_ip' cluster_network_subnet_reference_model = {} # ClusterNetworkSubnetReference cluster_network_subnet_reference_model['deleted'] = deleted_model - cluster_network_subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - ) + cluster_network_subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' cluster_network_subnet_reference_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' cluster_network_subnet_reference_model['name'] = 'my-cluster-network-subnet' cluster_network_subnet_reference_model['resource_type'] = 'cluster_network_subnet' - cluster_network_interface_target_model = ( - {} - ) # ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext - cluster_network_interface_target_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213' - ) + cluster_network_interface_target_model = {} # ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext + cluster_network_interface_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213' cluster_network_interface_target_model['id'] = '0717-fb880975-db45-4459-8548-64e3995ac213' cluster_network_interface_target_model['name'] = 'my-instance-network-attachment' cluster_network_interface_target_model['resource_type'] = 'instance_cluster_network_attachment' 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'] = 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' @@ -57967,9 +57775,7 @@ def test_cluster_network_interface_serialization(self): cluster_network_interface_model_json['auto_delete'] = False cluster_network_interface_model_json['created_at'] = '2019-01-01T12:00:00Z' cluster_network_interface_model_json['enable_infrastructure_nat'] = False - cluster_network_interface_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb' - ) + cluster_network_interface_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb' cluster_network_interface_model_json['id'] = '0717-ffc092f7-5d02-4b93-ab69-26860529b9fb' cluster_network_interface_model_json['lifecycle_reasons'] = [cluster_network_interface_lifecycle_reason_model] cluster_network_interface_model_json['lifecycle_state'] = 'stable' @@ -57987,9 +57793,7 @@ def test_cluster_network_interface_serialization(self): assert cluster_network_interface_model != False # Construct a model instance of ClusterNetworkInterface by calling from_dict on the json representation - cluster_network_interface_model_dict = ClusterNetworkInterface.from_dict( - cluster_network_interface_model_json - ).__dict__ + cluster_network_interface_model_dict = ClusterNetworkInterface.from_dict(cluster_network_interface_model_json).__dict__ cluster_network_interface_model2 = ClusterNetworkInterface(**cluster_network_interface_model_dict) # Verify the model instances are equivalent @@ -58013,18 +57817,12 @@ def test_cluster_network_interface_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces?limit=20' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces?limit=20' cluster_network_interface_lifecycle_reason_model = {} # ClusterNetworkInterfaceLifecycleReason cluster_network_interface_lifecycle_reason_model['code'] = 'resource_suspended_by_provider' - cluster_network_interface_lifecycle_reason_model['message'] = ( - 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - ) - cluster_network_interface_lifecycle_reason_model['more_info'] = ( - 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' - ) + cluster_network_interface_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + cluster_network_interface_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' deleted_model = {} # Deleted deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' @@ -58032,40 +57830,28 @@ def test_cluster_network_interface_collection_serialization(self): cluster_network_subnet_reserved_ip_reference_model = {} # ClusterNetworkSubnetReservedIPReference cluster_network_subnet_reserved_ip_reference_model['address'] = '10.1.0.6' cluster_network_subnet_reserved_ip_reference_model['deleted'] = deleted_model - cluster_network_subnet_reserved_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/63341ffa-1037-4b50-be40-676e3e9ac0c7' - ) + cluster_network_subnet_reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/63341ffa-1037-4b50-be40-676e3e9ac0c7' cluster_network_subnet_reserved_ip_reference_model['id'] = '63341ffa-1037-4b50-be40-676e3e9ac0c7' cluster_network_subnet_reserved_ip_reference_model['name'] = 'my-cluster-network-subnet-reserved-ip' cluster_network_subnet_reserved_ip_reference_model['resource_type'] = 'cluster_network_subnet_reserved_ip' cluster_network_subnet_reference_model = {} # ClusterNetworkSubnetReference cluster_network_subnet_reference_model['deleted'] = deleted_model - cluster_network_subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - ) + cluster_network_subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' cluster_network_subnet_reference_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' cluster_network_subnet_reference_model['name'] = 'my-cluster-network-subnet' cluster_network_subnet_reference_model['resource_type'] = 'cluster_network_subnet' - cluster_network_interface_target_model = ( - {} - ) # ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext - cluster_network_interface_target_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213' - ) + cluster_network_interface_target_model = {} # ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext + cluster_network_interface_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213' cluster_network_interface_target_model['id'] = '0717-fb880975-db45-4459-8548-64e3995ac213' cluster_network_interface_target_model['name'] = 'my-instance-network-attachment' cluster_network_interface_target_model['resource_type'] = 'instance_cluster_network_attachment' 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'] = 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' @@ -58079,9 +57865,7 @@ def test_cluster_network_interface_collection_serialization(self): cluster_network_interface_model['auto_delete'] = False cluster_network_interface_model['created_at'] = '2024-10-25T03:42:32.993000Z' cluster_network_interface_model['enable_infrastructure_nat'] = False - cluster_network_interface_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb' - ) + cluster_network_interface_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb' cluster_network_interface_model['id'] = '0717-ffc092f7-5d02-4b93-ab69-26860529b9fb' cluster_network_interface_model['lifecycle_reasons'] = [cluster_network_interface_lifecycle_reason_model] cluster_network_interface_model['lifecycle_state'] = 'stable' @@ -58103,18 +57887,12 @@ def test_cluster_network_interface_collection_serialization(self): cluster_network_interface_collection_model_json['total_count'] = 132 # Construct a model instance of ClusterNetworkInterfaceCollection by calling from_dict on the json representation - cluster_network_interface_collection_model = ClusterNetworkInterfaceCollection.from_dict( - cluster_network_interface_collection_model_json - ) + cluster_network_interface_collection_model = ClusterNetworkInterfaceCollection.from_dict(cluster_network_interface_collection_model_json) assert cluster_network_interface_collection_model != False # Construct a model instance of ClusterNetworkInterfaceCollection by calling from_dict on the json representation - cluster_network_interface_collection_model_dict = ClusterNetworkInterfaceCollection.from_dict( - cluster_network_interface_collection_model_json - ).__dict__ - cluster_network_interface_collection_model2 = ClusterNetworkInterfaceCollection( - **cluster_network_interface_collection_model_dict - ) + cluster_network_interface_collection_model_dict = ClusterNetworkInterfaceCollection.from_dict(cluster_network_interface_collection_model_json).__dict__ + cluster_network_interface_collection_model2 = ClusterNetworkInterfaceCollection(**cluster_network_interface_collection_model_dict) # Verify the model instances are equivalent assert cluster_network_interface_collection_model == cluster_network_interface_collection_model2 @@ -58137,38 +57915,23 @@ def test_cluster_network_interface_lifecycle_reason_serialization(self): # Construct a json representation of a ClusterNetworkInterfaceLifecycleReason model cluster_network_interface_lifecycle_reason_model_json = {} cluster_network_interface_lifecycle_reason_model_json['code'] = 'resource_suspended_by_provider' - cluster_network_interface_lifecycle_reason_model_json['message'] = ( - 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - ) - cluster_network_interface_lifecycle_reason_model_json['more_info'] = ( - 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' - ) + cluster_network_interface_lifecycle_reason_model_json['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + cluster_network_interface_lifecycle_reason_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' # Construct a model instance of ClusterNetworkInterfaceLifecycleReason by calling from_dict on the json representation - cluster_network_interface_lifecycle_reason_model = ClusterNetworkInterfaceLifecycleReason.from_dict( - cluster_network_interface_lifecycle_reason_model_json - ) + cluster_network_interface_lifecycle_reason_model = ClusterNetworkInterfaceLifecycleReason.from_dict(cluster_network_interface_lifecycle_reason_model_json) assert cluster_network_interface_lifecycle_reason_model != False # Construct a model instance of ClusterNetworkInterfaceLifecycleReason by calling from_dict on the json representation - cluster_network_interface_lifecycle_reason_model_dict = ClusterNetworkInterfaceLifecycleReason.from_dict( - cluster_network_interface_lifecycle_reason_model_json - ).__dict__ - cluster_network_interface_lifecycle_reason_model2 = ClusterNetworkInterfaceLifecycleReason( - **cluster_network_interface_lifecycle_reason_model_dict - ) + cluster_network_interface_lifecycle_reason_model_dict = ClusterNetworkInterfaceLifecycleReason.from_dict(cluster_network_interface_lifecycle_reason_model_json).__dict__ + cluster_network_interface_lifecycle_reason_model2 = ClusterNetworkInterfaceLifecycleReason(**cluster_network_interface_lifecycle_reason_model_dict) # Verify the model instances are equivalent assert cluster_network_interface_lifecycle_reason_model == cluster_network_interface_lifecycle_reason_model2 # Convert model instance back to dict and verify no loss of data - cluster_network_interface_lifecycle_reason_model_json2 = ( - cluster_network_interface_lifecycle_reason_model.to_dict() - ) - assert ( - cluster_network_interface_lifecycle_reason_model_json2 - == cluster_network_interface_lifecycle_reason_model_json - ) + cluster_network_interface_lifecycle_reason_model_json2 = cluster_network_interface_lifecycle_reason_model.to_dict() + assert cluster_network_interface_lifecycle_reason_model_json2 == cluster_network_interface_lifecycle_reason_model_json class TestModel_ClusterNetworkInterfacePatch: @@ -58187,18 +57950,12 @@ def test_cluster_network_interface_patch_serialization(self): cluster_network_interface_patch_model_json['name'] = 'my-cluster-network-interface' # Construct a model instance of ClusterNetworkInterfacePatch by calling from_dict on the json representation - cluster_network_interface_patch_model = ClusterNetworkInterfacePatch.from_dict( - cluster_network_interface_patch_model_json - ) + cluster_network_interface_patch_model = ClusterNetworkInterfacePatch.from_dict(cluster_network_interface_patch_model_json) assert cluster_network_interface_patch_model != False # Construct a model instance of ClusterNetworkInterfacePatch by calling from_dict on the json representation - cluster_network_interface_patch_model_dict = ClusterNetworkInterfacePatch.from_dict( - cluster_network_interface_patch_model_json - ).__dict__ - cluster_network_interface_patch_model2 = ClusterNetworkInterfacePatch( - **cluster_network_interface_patch_model_dict - ) + cluster_network_interface_patch_model_dict = ClusterNetworkInterfacePatch.from_dict(cluster_network_interface_patch_model_json).__dict__ + cluster_network_interface_patch_model2 = ClusterNetworkInterfacePatch(**cluster_network_interface_patch_model_dict) # Verify the model instances are equivalent assert cluster_network_interface_patch_model == cluster_network_interface_patch_model2 @@ -58226,18 +57983,14 @@ def test_cluster_network_interface_reference_serialization(self): cluster_network_subnet_reserved_ip_reference_model = {} # ClusterNetworkSubnetReservedIPReference cluster_network_subnet_reserved_ip_reference_model['address'] = '10.1.0.6' cluster_network_subnet_reserved_ip_reference_model['deleted'] = deleted_model - cluster_network_subnet_reserved_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/63341ffa-1037-4b50-be40-676e3e9ac0c7' - ) + cluster_network_subnet_reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/63341ffa-1037-4b50-be40-676e3e9ac0c7' cluster_network_subnet_reserved_ip_reference_model['id'] = '63341ffa-1037-4b50-be40-676e3e9ac0c7' cluster_network_subnet_reserved_ip_reference_model['name'] = 'my-cluster-network-subnet-reserved-ip' cluster_network_subnet_reserved_ip_reference_model['resource_type'] = 'cluster_network_subnet_reserved_ip' cluster_network_subnet_reference_model = {} # ClusterNetworkSubnetReference cluster_network_subnet_reference_model['deleted'] = deleted_model - cluster_network_subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - ) + cluster_network_subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' cluster_network_subnet_reference_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' cluster_network_subnet_reference_model['name'] = 'my-cluster-network-subnet' cluster_network_subnet_reference_model['resource_type'] = 'cluster_network_subnet' @@ -58245,30 +57998,20 @@ def test_cluster_network_interface_reference_serialization(self): # Construct a json representation of a ClusterNetworkInterfaceReference model cluster_network_interface_reference_model_json = {} cluster_network_interface_reference_model_json['deleted'] = deleted_model - cluster_network_interface_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb' - ) + cluster_network_interface_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb' cluster_network_interface_reference_model_json['id'] = '0717-ffc092f7-5d02-4b93-ab69-26860529b9fb' cluster_network_interface_reference_model_json['name'] = 'my-cluster-network-interface' - cluster_network_interface_reference_model_json['primary_ip'] = ( - cluster_network_subnet_reserved_ip_reference_model - ) + cluster_network_interface_reference_model_json['primary_ip'] = cluster_network_subnet_reserved_ip_reference_model cluster_network_interface_reference_model_json['resource_type'] = 'cluster_network_interface' cluster_network_interface_reference_model_json['subnet'] = cluster_network_subnet_reference_model # Construct a model instance of ClusterNetworkInterfaceReference by calling from_dict on the json representation - cluster_network_interface_reference_model = ClusterNetworkInterfaceReference.from_dict( - cluster_network_interface_reference_model_json - ) + cluster_network_interface_reference_model = ClusterNetworkInterfaceReference.from_dict(cluster_network_interface_reference_model_json) assert cluster_network_interface_reference_model != False # Construct a model instance of ClusterNetworkInterfaceReference by calling from_dict on the json representation - cluster_network_interface_reference_model_dict = ClusterNetworkInterfaceReference.from_dict( - cluster_network_interface_reference_model_json - ).__dict__ - cluster_network_interface_reference_model2 = ClusterNetworkInterfaceReference( - **cluster_network_interface_reference_model_dict - ) + cluster_network_interface_reference_model_dict = ClusterNetworkInterfaceReference.from_dict(cluster_network_interface_reference_model_json).__dict__ + cluster_network_interface_reference_model2 = ClusterNetworkInterfaceReference(**cluster_network_interface_reference_model_dict) # Verify the model instances are equivalent assert cluster_network_interface_reference_model == cluster_network_interface_reference_model2 @@ -58291,26 +58034,16 @@ def test_cluster_network_lifecycle_reason_serialization(self): # Construct a json representation of a ClusterNetworkLifecycleReason model cluster_network_lifecycle_reason_model_json = {} cluster_network_lifecycle_reason_model_json['code'] = 'resource_suspended_by_provider' - cluster_network_lifecycle_reason_model_json['message'] = ( - 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - ) - cluster_network_lifecycle_reason_model_json['more_info'] = ( - 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' - ) + cluster_network_lifecycle_reason_model_json['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + cluster_network_lifecycle_reason_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' # Construct a model instance of ClusterNetworkLifecycleReason by calling from_dict on the json representation - cluster_network_lifecycle_reason_model = ClusterNetworkLifecycleReason.from_dict( - cluster_network_lifecycle_reason_model_json - ) + cluster_network_lifecycle_reason_model = ClusterNetworkLifecycleReason.from_dict(cluster_network_lifecycle_reason_model_json) assert cluster_network_lifecycle_reason_model != False # Construct a model instance of ClusterNetworkLifecycleReason by calling from_dict on the json representation - cluster_network_lifecycle_reason_model_dict = ClusterNetworkLifecycleReason.from_dict( - cluster_network_lifecycle_reason_model_json - ).__dict__ - cluster_network_lifecycle_reason_model2 = ClusterNetworkLifecycleReason( - **cluster_network_lifecycle_reason_model_dict - ) + cluster_network_lifecycle_reason_model_dict = ClusterNetworkLifecycleReason.from_dict(cluster_network_lifecycle_reason_model_json).__dict__ + cluster_network_lifecycle_reason_model2 = ClusterNetworkLifecycleReason(**cluster_network_lifecycle_reason_model_dict) # Verify the model instances are equivalent assert cluster_network_lifecycle_reason_model == cluster_network_lifecycle_reason_model2 @@ -58363,9 +58096,7 @@ def test_cluster_network_profile_serialization(self): # Construct dict forms of any model objects needed in order to build this model. instance_profile_reference_model = {} # InstanceProfileReference - instance_profile_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/tx3-160x1536-8h100' - ) + instance_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/tx3-160x1536-8h100' instance_profile_reference_model['name'] = 'tx3-160x1536-8h100' instance_profile_reference_model['resource_type'] = 'instance_profile' @@ -58376,9 +58107,7 @@ def test_cluster_network_profile_serialization(self): # Construct a json representation of a ClusterNetworkProfile model cluster_network_profile_model_json = {} cluster_network_profile_model_json['family'] = 'vela' - cluster_network_profile_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100' - ) + cluster_network_profile_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100' cluster_network_profile_model_json['name'] = 'h100' cluster_network_profile_model_json['resource_type'] = 'cluster_network_profile' cluster_network_profile_model_json['supported_instance_profiles'] = [instance_profile_reference_model] @@ -58389,9 +58118,7 @@ def test_cluster_network_profile_serialization(self): assert cluster_network_profile_model != False # Construct a model instance of ClusterNetworkProfile by calling from_dict on the json representation - cluster_network_profile_model_dict = ClusterNetworkProfile.from_dict( - cluster_network_profile_model_json - ).__dict__ + cluster_network_profile_model_dict = ClusterNetworkProfile.from_dict(cluster_network_profile_model_json).__dict__ cluster_network_profile_model2 = ClusterNetworkProfile(**cluster_network_profile_model_dict) # Verify the model instances are equivalent @@ -58418,9 +58145,7 @@ def test_cluster_network_profile_collection_serialization(self): page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles?limit=50' instance_profile_reference_model = {} # InstanceProfileReference - instance_profile_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/tx3-160x1536-8h100' - ) + instance_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/tx3-160x1536-8h100' instance_profile_reference_model['name'] = 'tx3-160x1536-8h100' instance_profile_reference_model['resource_type'] = 'instance_profile' @@ -58445,18 +58170,12 @@ def test_cluster_network_profile_collection_serialization(self): cluster_network_profile_collection_model_json['total_count'] = 132 # Construct a model instance of ClusterNetworkProfileCollection by calling from_dict on the json representation - cluster_network_profile_collection_model = ClusterNetworkProfileCollection.from_dict( - cluster_network_profile_collection_model_json - ) + cluster_network_profile_collection_model = ClusterNetworkProfileCollection.from_dict(cluster_network_profile_collection_model_json) assert cluster_network_profile_collection_model != False # Construct a model instance of ClusterNetworkProfileCollection by calling from_dict on the json representation - cluster_network_profile_collection_model_dict = ClusterNetworkProfileCollection.from_dict( - cluster_network_profile_collection_model_json - ).__dict__ - cluster_network_profile_collection_model2 = ClusterNetworkProfileCollection( - **cluster_network_profile_collection_model_dict - ) + cluster_network_profile_collection_model_dict = ClusterNetworkProfileCollection.from_dict(cluster_network_profile_collection_model_json).__dict__ + cluster_network_profile_collection_model2 = ClusterNetworkProfileCollection(**cluster_network_profile_collection_model_dict) # Verify the model instances are equivalent assert cluster_network_profile_collection_model == cluster_network_profile_collection_model2 @@ -58478,25 +58197,17 @@ def test_cluster_network_profile_reference_serialization(self): # Construct a json representation of a ClusterNetworkProfileReference model cluster_network_profile_reference_model_json = {} - cluster_network_profile_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100' - ) + cluster_network_profile_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100' cluster_network_profile_reference_model_json['name'] = 'h100' cluster_network_profile_reference_model_json['resource_type'] = 'cluster_network_profile' # Construct a model instance of ClusterNetworkProfileReference by calling from_dict on the json representation - cluster_network_profile_reference_model = ClusterNetworkProfileReference.from_dict( - cluster_network_profile_reference_model_json - ) + cluster_network_profile_reference_model = ClusterNetworkProfileReference.from_dict(cluster_network_profile_reference_model_json) assert cluster_network_profile_reference_model != False # Construct a model instance of ClusterNetworkProfileReference by calling from_dict on the json representation - cluster_network_profile_reference_model_dict = ClusterNetworkProfileReference.from_dict( - cluster_network_profile_reference_model_json - ).__dict__ - cluster_network_profile_reference_model2 = ClusterNetworkProfileReference( - **cluster_network_profile_reference_model_dict - ) + cluster_network_profile_reference_model_dict = ClusterNetworkProfileReference.from_dict(cluster_network_profile_reference_model_json).__dict__ + cluster_network_profile_reference_model2 = ClusterNetworkProfileReference(**cluster_network_profile_reference_model_dict) # Verify the model instances are equivalent assert cluster_network_profile_reference_model == cluster_network_profile_reference_model2 @@ -58523,13 +58234,9 @@ def test_cluster_network_reference_serialization(self): # Construct a json representation of a ClusterNetworkReference model cluster_network_reference_model_json = {} - cluster_network_reference_model_json['crn'] = ( - 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573' - ) + cluster_network_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573' cluster_network_reference_model_json['deleted'] = deleted_model - cluster_network_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573' - ) + cluster_network_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573' cluster_network_reference_model_json['id'] = '0717-da0df18c-7598-4633-a648-fdaac28a5573' cluster_network_reference_model_json['name'] = 'my-cluster-network' cluster_network_reference_model_json['resource_type'] = 'cluster_network' @@ -58539,9 +58246,7 @@ def test_cluster_network_reference_serialization(self): assert cluster_network_reference_model != False # Construct a model instance of ClusterNetworkReference by calling from_dict on the json representation - cluster_network_reference_model_dict = ClusterNetworkReference.from_dict( - cluster_network_reference_model_json - ).__dict__ + cluster_network_reference_model_dict = ClusterNetworkReference.from_dict(cluster_network_reference_model_json).__dict__ cluster_network_reference_model2 = ClusterNetworkReference(**cluster_network_reference_model_dict) # Verify the model instances are equivalent @@ -58566,20 +58271,14 @@ def test_cluster_network_subnet_serialization(self): cluster_network_subnet_lifecycle_reason_model = {} # ClusterNetworkSubnetLifecycleReason cluster_network_subnet_lifecycle_reason_model['code'] = 'resource_suspended_by_provider' - cluster_network_subnet_lifecycle_reason_model['message'] = ( - 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - ) - cluster_network_subnet_lifecycle_reason_model['more_info'] = ( - 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' - ) + cluster_network_subnet_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + cluster_network_subnet_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' # Construct a json representation of a ClusterNetworkSubnet model cluster_network_subnet_model_json = {} cluster_network_subnet_model_json['available_ipv4_address_count'] = 15 cluster_network_subnet_model_json['created_at'] = '2019-01-01T12:00:00Z' - cluster_network_subnet_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - ) + cluster_network_subnet_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' cluster_network_subnet_model_json['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' cluster_network_subnet_model_json['ip_version'] = 'ipv4' cluster_network_subnet_model_json['ipv4_cidr_block'] = '10.0.0.0/24' @@ -58618,25 +58317,17 @@ def test_cluster_network_subnet_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets?limit=50' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets?limit=50' cluster_network_subnet_lifecycle_reason_model = {} # ClusterNetworkSubnetLifecycleReason cluster_network_subnet_lifecycle_reason_model['code'] = 'resource_suspended_by_provider' - cluster_network_subnet_lifecycle_reason_model['message'] = ( - 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - ) - cluster_network_subnet_lifecycle_reason_model['more_info'] = ( - 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' - ) + cluster_network_subnet_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + cluster_network_subnet_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' cluster_network_subnet_model = {} # ClusterNetworkSubnet cluster_network_subnet_model['available_ipv4_address_count'] = 251 cluster_network_subnet_model['created_at'] = '2024-10-25T11:59:46Z' - cluster_network_subnet_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - ) + cluster_network_subnet_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' cluster_network_subnet_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' cluster_network_subnet_model['ip_version'] = 'ipv4' cluster_network_subnet_model['ipv4_cidr_block'] = '10.0.1.0/24' @@ -58655,18 +58346,12 @@ def test_cluster_network_subnet_collection_serialization(self): cluster_network_subnet_collection_model_json['total_count'] = 132 # Construct a model instance of ClusterNetworkSubnetCollection by calling from_dict on the json representation - cluster_network_subnet_collection_model = ClusterNetworkSubnetCollection.from_dict( - cluster_network_subnet_collection_model_json - ) + cluster_network_subnet_collection_model = ClusterNetworkSubnetCollection.from_dict(cluster_network_subnet_collection_model_json) assert cluster_network_subnet_collection_model != False # Construct a model instance of ClusterNetworkSubnetCollection by calling from_dict on the json representation - cluster_network_subnet_collection_model_dict = ClusterNetworkSubnetCollection.from_dict( - cluster_network_subnet_collection_model_json - ).__dict__ - cluster_network_subnet_collection_model2 = ClusterNetworkSubnetCollection( - **cluster_network_subnet_collection_model_dict - ) + cluster_network_subnet_collection_model_dict = ClusterNetworkSubnetCollection.from_dict(cluster_network_subnet_collection_model_json).__dict__ + cluster_network_subnet_collection_model2 = ClusterNetworkSubnetCollection(**cluster_network_subnet_collection_model_dict) # Verify the model instances are equivalent assert cluster_network_subnet_collection_model == cluster_network_subnet_collection_model2 @@ -58689,26 +58374,16 @@ def test_cluster_network_subnet_lifecycle_reason_serialization(self): # Construct a json representation of a ClusterNetworkSubnetLifecycleReason model cluster_network_subnet_lifecycle_reason_model_json = {} cluster_network_subnet_lifecycle_reason_model_json['code'] = 'resource_suspended_by_provider' - cluster_network_subnet_lifecycle_reason_model_json['message'] = ( - 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - ) - cluster_network_subnet_lifecycle_reason_model_json['more_info'] = ( - 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' - ) + cluster_network_subnet_lifecycle_reason_model_json['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + cluster_network_subnet_lifecycle_reason_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' # Construct a model instance of ClusterNetworkSubnetLifecycleReason by calling from_dict on the json representation - cluster_network_subnet_lifecycle_reason_model = ClusterNetworkSubnetLifecycleReason.from_dict( - cluster_network_subnet_lifecycle_reason_model_json - ) + cluster_network_subnet_lifecycle_reason_model = ClusterNetworkSubnetLifecycleReason.from_dict(cluster_network_subnet_lifecycle_reason_model_json) assert cluster_network_subnet_lifecycle_reason_model != False # Construct a model instance of ClusterNetworkSubnetLifecycleReason by calling from_dict on the json representation - cluster_network_subnet_lifecycle_reason_model_dict = ClusterNetworkSubnetLifecycleReason.from_dict( - cluster_network_subnet_lifecycle_reason_model_json - ).__dict__ - cluster_network_subnet_lifecycle_reason_model2 = ClusterNetworkSubnetLifecycleReason( - **cluster_network_subnet_lifecycle_reason_model_dict - ) + cluster_network_subnet_lifecycle_reason_model_dict = ClusterNetworkSubnetLifecycleReason.from_dict(cluster_network_subnet_lifecycle_reason_model_json).__dict__ + cluster_network_subnet_lifecycle_reason_model2 = ClusterNetworkSubnetLifecycleReason(**cluster_network_subnet_lifecycle_reason_model_dict) # Verify the model instances are equivalent assert cluster_network_subnet_lifecycle_reason_model == cluster_network_subnet_lifecycle_reason_model2 @@ -58733,15 +58408,11 @@ def test_cluster_network_subnet_patch_serialization(self): cluster_network_subnet_patch_model_json['name'] = 'my-cluster-network-subnet' # Construct a model instance of ClusterNetworkSubnetPatch by calling from_dict on the json representation - cluster_network_subnet_patch_model = ClusterNetworkSubnetPatch.from_dict( - cluster_network_subnet_patch_model_json - ) + cluster_network_subnet_patch_model = ClusterNetworkSubnetPatch.from_dict(cluster_network_subnet_patch_model_json) assert cluster_network_subnet_patch_model != False # Construct a model instance of ClusterNetworkSubnetPatch by calling from_dict on the json representation - cluster_network_subnet_patch_model_dict = ClusterNetworkSubnetPatch.from_dict( - cluster_network_subnet_patch_model_json - ).__dict__ + cluster_network_subnet_patch_model_dict = ClusterNetworkSubnetPatch.from_dict(cluster_network_subnet_patch_model_json).__dict__ cluster_network_subnet_patch_model2 = ClusterNetworkSubnetPatch(**cluster_network_subnet_patch_model_dict) # Verify the model instances are equivalent @@ -58768,15 +58439,11 @@ def test_cluster_network_subnet_prefix_serialization(self): cluster_network_subnet_prefix_model_json['cidr'] = '10.0.0.0/24' # Construct a model instance of ClusterNetworkSubnetPrefix by calling from_dict on the json representation - cluster_network_subnet_prefix_model = ClusterNetworkSubnetPrefix.from_dict( - cluster_network_subnet_prefix_model_json - ) + cluster_network_subnet_prefix_model = ClusterNetworkSubnetPrefix.from_dict(cluster_network_subnet_prefix_model_json) assert cluster_network_subnet_prefix_model != False # Construct a model instance of ClusterNetworkSubnetPrefix by calling from_dict on the json representation - cluster_network_subnet_prefix_model_dict = ClusterNetworkSubnetPrefix.from_dict( - cluster_network_subnet_prefix_model_json - ).__dict__ + cluster_network_subnet_prefix_model_dict = ClusterNetworkSubnetPrefix.from_dict(cluster_network_subnet_prefix_model_json).__dict__ cluster_network_subnet_prefix_model2 = ClusterNetworkSubnetPrefix(**cluster_network_subnet_prefix_model_dict) # Verify the model instances are equivalent @@ -58802,18 +58469,12 @@ def test_cluster_network_subnet_prefix_prototype_serialization(self): cluster_network_subnet_prefix_prototype_model_json['cidr'] = '10.0.0.0/24' # Construct a model instance of ClusterNetworkSubnetPrefixPrototype by calling from_dict on the json representation - cluster_network_subnet_prefix_prototype_model = ClusterNetworkSubnetPrefixPrototype.from_dict( - cluster_network_subnet_prefix_prototype_model_json - ) + cluster_network_subnet_prefix_prototype_model = ClusterNetworkSubnetPrefixPrototype.from_dict(cluster_network_subnet_prefix_prototype_model_json) assert cluster_network_subnet_prefix_prototype_model != False # Construct a model instance of ClusterNetworkSubnetPrefixPrototype by calling from_dict on the json representation - cluster_network_subnet_prefix_prototype_model_dict = ClusterNetworkSubnetPrefixPrototype.from_dict( - cluster_network_subnet_prefix_prototype_model_json - ).__dict__ - cluster_network_subnet_prefix_prototype_model2 = ClusterNetworkSubnetPrefixPrototype( - **cluster_network_subnet_prefix_prototype_model_dict - ) + cluster_network_subnet_prefix_prototype_model_dict = ClusterNetworkSubnetPrefixPrototype.from_dict(cluster_network_subnet_prefix_prototype_model_json).__dict__ + cluster_network_subnet_prefix_prototype_model2 = ClusterNetworkSubnetPrefixPrototype(**cluster_network_subnet_prefix_prototype_model_dict) # Verify the model instances are equivalent assert cluster_network_subnet_prefix_prototype_model == cluster_network_subnet_prefix_prototype_model2 @@ -58841,26 +58502,18 @@ def test_cluster_network_subnet_reference_serialization(self): # Construct a json representation of a ClusterNetworkSubnetReference model cluster_network_subnet_reference_model_json = {} cluster_network_subnet_reference_model_json['deleted'] = deleted_model - cluster_network_subnet_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - ) + cluster_network_subnet_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' cluster_network_subnet_reference_model_json['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' cluster_network_subnet_reference_model_json['name'] = 'my-cluster-network-subnet' cluster_network_subnet_reference_model_json['resource_type'] = 'cluster_network_subnet' # Construct a model instance of ClusterNetworkSubnetReference by calling from_dict on the json representation - cluster_network_subnet_reference_model = ClusterNetworkSubnetReference.from_dict( - cluster_network_subnet_reference_model_json - ) + cluster_network_subnet_reference_model = ClusterNetworkSubnetReference.from_dict(cluster_network_subnet_reference_model_json) assert cluster_network_subnet_reference_model != False # Construct a model instance of ClusterNetworkSubnetReference by calling from_dict on the json representation - cluster_network_subnet_reference_model_dict = ClusterNetworkSubnetReference.from_dict( - cluster_network_subnet_reference_model_json - ).__dict__ - cluster_network_subnet_reference_model2 = ClusterNetworkSubnetReference( - **cluster_network_subnet_reference_model_dict - ) + cluster_network_subnet_reference_model_dict = ClusterNetworkSubnetReference.from_dict(cluster_network_subnet_reference_model_json).__dict__ + cluster_network_subnet_reference_model2 = ClusterNetworkSubnetReference(**cluster_network_subnet_reference_model_dict) # Verify the model instances are equivalent assert cluster_network_subnet_reference_model == cluster_network_subnet_reference_model2 @@ -58884,23 +58537,15 @@ def test_cluster_network_subnet_reserved_ip_serialization(self): cluster_network_subnet_reserved_ip_lifecycle_reason_model = {} # ClusterNetworkSubnetReservedIPLifecycleReason cluster_network_subnet_reserved_ip_lifecycle_reason_model['code'] = 'resource_suspended_by_provider' - cluster_network_subnet_reserved_ip_lifecycle_reason_model['message'] = ( - 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - ) - cluster_network_subnet_reserved_ip_lifecycle_reason_model['more_info'] = ( - 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' - ) + cluster_network_subnet_reserved_ip_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + cluster_network_subnet_reserved_ip_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' deleted_model = {} # Deleted deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - cluster_network_subnet_reserved_ip_target_model = ( - {} - ) # ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext + cluster_network_subnet_reserved_ip_target_model = {} # ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext cluster_network_subnet_reserved_ip_target_model['deleted'] = deleted_model - cluster_network_subnet_reserved_ip_target_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb' - ) + cluster_network_subnet_reserved_ip_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb' cluster_network_subnet_reserved_ip_target_model['id'] = '0717-ffc092f7-5d02-4b93-ab69-26860529b9fb' cluster_network_subnet_reserved_ip_target_model['name'] = 'my-cluster-network-interface' cluster_network_subnet_reserved_ip_target_model['resource_type'] = 'cluster_network_interface' @@ -58910,13 +58555,9 @@ def test_cluster_network_subnet_reserved_ip_serialization(self): cluster_network_subnet_reserved_ip_model_json['address'] = '10.1.0.6' cluster_network_subnet_reserved_ip_model_json['auto_delete'] = False cluster_network_subnet_reserved_ip_model_json['created_at'] = '2019-01-01T12:00:00Z' - cluster_network_subnet_reserved_ip_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb' - ) + cluster_network_subnet_reserved_ip_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb' cluster_network_subnet_reserved_ip_model_json['id'] = '6d353a0f-aeb1-4ae1-832e-1110d10981bb' - cluster_network_subnet_reserved_ip_model_json['lifecycle_reasons'] = [ - cluster_network_subnet_reserved_ip_lifecycle_reason_model - ] + cluster_network_subnet_reserved_ip_model_json['lifecycle_reasons'] = [cluster_network_subnet_reserved_ip_lifecycle_reason_model] cluster_network_subnet_reserved_ip_model_json['lifecycle_state'] = 'stable' cluster_network_subnet_reserved_ip_model_json['name'] = 'my-cluster-network-subnet-reserved-ip' cluster_network_subnet_reserved_ip_model_json['owner'] = 'user' @@ -58924,18 +58565,12 @@ def test_cluster_network_subnet_reserved_ip_serialization(self): cluster_network_subnet_reserved_ip_model_json['target'] = cluster_network_subnet_reserved_ip_target_model # Construct a model instance of ClusterNetworkSubnetReservedIP by calling from_dict on the json representation - cluster_network_subnet_reserved_ip_model = ClusterNetworkSubnetReservedIP.from_dict( - cluster_network_subnet_reserved_ip_model_json - ) + cluster_network_subnet_reserved_ip_model = ClusterNetworkSubnetReservedIP.from_dict(cluster_network_subnet_reserved_ip_model_json) assert cluster_network_subnet_reserved_ip_model != False # Construct a model instance of ClusterNetworkSubnetReservedIP by calling from_dict on the json representation - cluster_network_subnet_reserved_ip_model_dict = ClusterNetworkSubnetReservedIP.from_dict( - cluster_network_subnet_reserved_ip_model_json - ).__dict__ - cluster_network_subnet_reserved_ip_model2 = ClusterNetworkSubnetReservedIP( - **cluster_network_subnet_reserved_ip_model_dict - ) + cluster_network_subnet_reserved_ip_model_dict = ClusterNetworkSubnetReservedIP.from_dict(cluster_network_subnet_reserved_ip_model_json).__dict__ + cluster_network_subnet_reserved_ip_model2 = ClusterNetworkSubnetReservedIP(**cluster_network_subnet_reserved_ip_model_dict) # Verify the model instances are equivalent assert cluster_network_subnet_reserved_ip_model == cluster_network_subnet_reserved_ip_model2 @@ -58958,29 +58593,19 @@ def test_cluster_network_subnet_reserved_ip_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips?limit=50' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips?limit=50' cluster_network_subnet_reserved_ip_lifecycle_reason_model = {} # ClusterNetworkSubnetReservedIPLifecycleReason cluster_network_subnet_reserved_ip_lifecycle_reason_model['code'] = 'resource_suspended_by_provider' - cluster_network_subnet_reserved_ip_lifecycle_reason_model['message'] = ( - 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - ) - cluster_network_subnet_reserved_ip_lifecycle_reason_model['more_info'] = ( - 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' - ) + cluster_network_subnet_reserved_ip_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + cluster_network_subnet_reserved_ip_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' deleted_model = {} # Deleted deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - cluster_network_subnet_reserved_ip_target_model = ( - {} - ) # ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext + cluster_network_subnet_reserved_ip_target_model = {} # ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext cluster_network_subnet_reserved_ip_target_model['deleted'] = deleted_model - cluster_network_subnet_reserved_ip_target_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb' - ) + cluster_network_subnet_reserved_ip_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb' cluster_network_subnet_reserved_ip_target_model['id'] = '0717-ffc092f7-5d02-4b93-ab69-26860529b9fb' cluster_network_subnet_reserved_ip_target_model['name'] = 'my-cluster-network-interface' cluster_network_subnet_reserved_ip_target_model['resource_type'] = 'cluster_network_interface' @@ -58989,13 +58614,9 @@ def test_cluster_network_subnet_reserved_ip_collection_serialization(self): cluster_network_subnet_reserved_ip_model['address'] = '10.1.0.6' cluster_network_subnet_reserved_ip_model['auto_delete'] = False cluster_network_subnet_reserved_ip_model['created_at'] = '2020-07-24T19:52:13Z' - cluster_network_subnet_reserved_ip_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/63341ffa-1037-4b50-be40-676e3e9ac0c7' - ) + cluster_network_subnet_reserved_ip_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/63341ffa-1037-4b50-be40-676e3e9ac0c7' cluster_network_subnet_reserved_ip_model['id'] = '63341ffa-1037-4b50-be40-676e3e9ac0c7' - cluster_network_subnet_reserved_ip_model['lifecycle_reasons'] = [ - cluster_network_subnet_reserved_ip_lifecycle_reason_model - ] + cluster_network_subnet_reserved_ip_model['lifecycle_reasons'] = [cluster_network_subnet_reserved_ip_lifecycle_reason_model] cluster_network_subnet_reserved_ip_model['lifecycle_state'] = 'stable' cluster_network_subnet_reserved_ip_model['name'] = 'my-cluster-network-subnet-reserved-ip' cluster_network_subnet_reserved_ip_model['owner'] = 'user' @@ -59007,38 +58628,23 @@ def test_cluster_network_subnet_reserved_ip_collection_serialization(self): cluster_network_subnet_reserved_ip_collection_model_json['first'] = page_link_model cluster_network_subnet_reserved_ip_collection_model_json['limit'] = 20 cluster_network_subnet_reserved_ip_collection_model_json['next'] = page_link_model - cluster_network_subnet_reserved_ip_collection_model_json['reserved_ips'] = [ - cluster_network_subnet_reserved_ip_model - ] + cluster_network_subnet_reserved_ip_collection_model_json['reserved_ips'] = [cluster_network_subnet_reserved_ip_model] cluster_network_subnet_reserved_ip_collection_model_json['total_count'] = 132 # Construct a model instance of ClusterNetworkSubnetReservedIPCollection by calling from_dict on the json representation - cluster_network_subnet_reserved_ip_collection_model = ClusterNetworkSubnetReservedIPCollection.from_dict( - cluster_network_subnet_reserved_ip_collection_model_json - ) + cluster_network_subnet_reserved_ip_collection_model = ClusterNetworkSubnetReservedIPCollection.from_dict(cluster_network_subnet_reserved_ip_collection_model_json) assert cluster_network_subnet_reserved_ip_collection_model != False # Construct a model instance of ClusterNetworkSubnetReservedIPCollection by calling from_dict on the json representation - cluster_network_subnet_reserved_ip_collection_model_dict = ClusterNetworkSubnetReservedIPCollection.from_dict( - cluster_network_subnet_reserved_ip_collection_model_json - ).__dict__ - cluster_network_subnet_reserved_ip_collection_model2 = ClusterNetworkSubnetReservedIPCollection( - **cluster_network_subnet_reserved_ip_collection_model_dict - ) + cluster_network_subnet_reserved_ip_collection_model_dict = ClusterNetworkSubnetReservedIPCollection.from_dict(cluster_network_subnet_reserved_ip_collection_model_json).__dict__ + cluster_network_subnet_reserved_ip_collection_model2 = ClusterNetworkSubnetReservedIPCollection(**cluster_network_subnet_reserved_ip_collection_model_dict) # Verify the model instances are equivalent - assert ( - cluster_network_subnet_reserved_ip_collection_model == cluster_network_subnet_reserved_ip_collection_model2 - ) + assert cluster_network_subnet_reserved_ip_collection_model == cluster_network_subnet_reserved_ip_collection_model2 # Convert model instance back to dict and verify no loss of data - cluster_network_subnet_reserved_ip_collection_model_json2 = ( - cluster_network_subnet_reserved_ip_collection_model.to_dict() - ) - assert ( - cluster_network_subnet_reserved_ip_collection_model_json2 - == cluster_network_subnet_reserved_ip_collection_model_json - ) + cluster_network_subnet_reserved_ip_collection_model_json2 = cluster_network_subnet_reserved_ip_collection_model.to_dict() + assert cluster_network_subnet_reserved_ip_collection_model_json2 == cluster_network_subnet_reserved_ip_collection_model_json class TestModel_ClusterNetworkSubnetReservedIPLifecycleReason: @@ -59054,45 +58660,23 @@ def test_cluster_network_subnet_reserved_ip_lifecycle_reason_serialization(self) # Construct a json representation of a ClusterNetworkSubnetReservedIPLifecycleReason model cluster_network_subnet_reserved_ip_lifecycle_reason_model_json = {} cluster_network_subnet_reserved_ip_lifecycle_reason_model_json['code'] = 'resource_suspended_by_provider' - cluster_network_subnet_reserved_ip_lifecycle_reason_model_json['message'] = ( - 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - ) - cluster_network_subnet_reserved_ip_lifecycle_reason_model_json['more_info'] = ( - 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' - ) + cluster_network_subnet_reserved_ip_lifecycle_reason_model_json['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + cluster_network_subnet_reserved_ip_lifecycle_reason_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' # Construct a model instance of ClusterNetworkSubnetReservedIPLifecycleReason by calling from_dict on the json representation - cluster_network_subnet_reserved_ip_lifecycle_reason_model = ( - ClusterNetworkSubnetReservedIPLifecycleReason.from_dict( - cluster_network_subnet_reserved_ip_lifecycle_reason_model_json - ) - ) + cluster_network_subnet_reserved_ip_lifecycle_reason_model = ClusterNetworkSubnetReservedIPLifecycleReason.from_dict(cluster_network_subnet_reserved_ip_lifecycle_reason_model_json) assert cluster_network_subnet_reserved_ip_lifecycle_reason_model != False # Construct a model instance of ClusterNetworkSubnetReservedIPLifecycleReason by calling from_dict on the json representation - cluster_network_subnet_reserved_ip_lifecycle_reason_model_dict = ( - ClusterNetworkSubnetReservedIPLifecycleReason.from_dict( - cluster_network_subnet_reserved_ip_lifecycle_reason_model_json - ).__dict__ - ) - cluster_network_subnet_reserved_ip_lifecycle_reason_model2 = ClusterNetworkSubnetReservedIPLifecycleReason( - **cluster_network_subnet_reserved_ip_lifecycle_reason_model_dict - ) + cluster_network_subnet_reserved_ip_lifecycle_reason_model_dict = ClusterNetworkSubnetReservedIPLifecycleReason.from_dict(cluster_network_subnet_reserved_ip_lifecycle_reason_model_json).__dict__ + cluster_network_subnet_reserved_ip_lifecycle_reason_model2 = ClusterNetworkSubnetReservedIPLifecycleReason(**cluster_network_subnet_reserved_ip_lifecycle_reason_model_dict) # Verify the model instances are equivalent - assert ( - cluster_network_subnet_reserved_ip_lifecycle_reason_model - == cluster_network_subnet_reserved_ip_lifecycle_reason_model2 - ) + assert cluster_network_subnet_reserved_ip_lifecycle_reason_model == cluster_network_subnet_reserved_ip_lifecycle_reason_model2 # Convert model instance back to dict and verify no loss of data - cluster_network_subnet_reserved_ip_lifecycle_reason_model_json2 = ( - cluster_network_subnet_reserved_ip_lifecycle_reason_model.to_dict() - ) - assert ( - cluster_network_subnet_reserved_ip_lifecycle_reason_model_json2 - == cluster_network_subnet_reserved_ip_lifecycle_reason_model_json - ) + cluster_network_subnet_reserved_ip_lifecycle_reason_model_json2 = cluster_network_subnet_reserved_ip_lifecycle_reason_model.to_dict() + assert cluster_network_subnet_reserved_ip_lifecycle_reason_model_json2 == cluster_network_subnet_reserved_ip_lifecycle_reason_model_json class TestModel_ClusterNetworkSubnetReservedIPPatch: @@ -59111,27 +58695,19 @@ def test_cluster_network_subnet_reserved_ip_patch_serialization(self): cluster_network_subnet_reserved_ip_patch_model_json['name'] = 'my-cluster-network-subnet-reserved-ip' # Construct a model instance of ClusterNetworkSubnetReservedIPPatch by calling from_dict on the json representation - cluster_network_subnet_reserved_ip_patch_model = ClusterNetworkSubnetReservedIPPatch.from_dict( - cluster_network_subnet_reserved_ip_patch_model_json - ) + cluster_network_subnet_reserved_ip_patch_model = ClusterNetworkSubnetReservedIPPatch.from_dict(cluster_network_subnet_reserved_ip_patch_model_json) assert cluster_network_subnet_reserved_ip_patch_model != False # Construct a model instance of ClusterNetworkSubnetReservedIPPatch by calling from_dict on the json representation - cluster_network_subnet_reserved_ip_patch_model_dict = ClusterNetworkSubnetReservedIPPatch.from_dict( - cluster_network_subnet_reserved_ip_patch_model_json - ).__dict__ - cluster_network_subnet_reserved_ip_patch_model2 = ClusterNetworkSubnetReservedIPPatch( - **cluster_network_subnet_reserved_ip_patch_model_dict - ) + cluster_network_subnet_reserved_ip_patch_model_dict = ClusterNetworkSubnetReservedIPPatch.from_dict(cluster_network_subnet_reserved_ip_patch_model_json).__dict__ + cluster_network_subnet_reserved_ip_patch_model2 = ClusterNetworkSubnetReservedIPPatch(**cluster_network_subnet_reserved_ip_patch_model_dict) # Verify the model instances are equivalent assert cluster_network_subnet_reserved_ip_patch_model == cluster_network_subnet_reserved_ip_patch_model2 # Convert model instance back to dict and verify no loss of data cluster_network_subnet_reserved_ip_patch_model_json2 = cluster_network_subnet_reserved_ip_patch_model.to_dict() - assert ( - cluster_network_subnet_reserved_ip_patch_model_json2 == cluster_network_subnet_reserved_ip_patch_model_json - ) + assert cluster_network_subnet_reserved_ip_patch_model_json2 == cluster_network_subnet_reserved_ip_patch_model_json class TestModel_ClusterNetworkSubnetReservedIPReference: @@ -59153,38 +58729,25 @@ def test_cluster_network_subnet_reserved_ip_reference_serialization(self): cluster_network_subnet_reserved_ip_reference_model_json = {} cluster_network_subnet_reserved_ip_reference_model_json['address'] = '10.1.0.6' cluster_network_subnet_reserved_ip_reference_model_json['deleted'] = deleted_model - cluster_network_subnet_reserved_ip_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb' - ) + cluster_network_subnet_reserved_ip_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb' cluster_network_subnet_reserved_ip_reference_model_json['id'] = '6d353a0f-aeb1-4ae1-832e-1110d10981bb' cluster_network_subnet_reserved_ip_reference_model_json['name'] = 'my-cluster-network-subnet-reserved-ip' cluster_network_subnet_reserved_ip_reference_model_json['resource_type'] = 'cluster_network_subnet_reserved_ip' # Construct a model instance of ClusterNetworkSubnetReservedIPReference by calling from_dict on the json representation - cluster_network_subnet_reserved_ip_reference_model = ClusterNetworkSubnetReservedIPReference.from_dict( - cluster_network_subnet_reserved_ip_reference_model_json - ) + cluster_network_subnet_reserved_ip_reference_model = ClusterNetworkSubnetReservedIPReference.from_dict(cluster_network_subnet_reserved_ip_reference_model_json) assert cluster_network_subnet_reserved_ip_reference_model != False # Construct a model instance of ClusterNetworkSubnetReservedIPReference by calling from_dict on the json representation - cluster_network_subnet_reserved_ip_reference_model_dict = ClusterNetworkSubnetReservedIPReference.from_dict( - cluster_network_subnet_reserved_ip_reference_model_json - ).__dict__ - cluster_network_subnet_reserved_ip_reference_model2 = ClusterNetworkSubnetReservedIPReference( - **cluster_network_subnet_reserved_ip_reference_model_dict - ) + cluster_network_subnet_reserved_ip_reference_model_dict = ClusterNetworkSubnetReservedIPReference.from_dict(cluster_network_subnet_reserved_ip_reference_model_json).__dict__ + cluster_network_subnet_reserved_ip_reference_model2 = ClusterNetworkSubnetReservedIPReference(**cluster_network_subnet_reserved_ip_reference_model_dict) # Verify the model instances are equivalent assert cluster_network_subnet_reserved_ip_reference_model == cluster_network_subnet_reserved_ip_reference_model2 # Convert model instance back to dict and verify no loss of data - cluster_network_subnet_reserved_ip_reference_model_json2 = ( - cluster_network_subnet_reserved_ip_reference_model.to_dict() - ) - assert ( - cluster_network_subnet_reserved_ip_reference_model_json2 - == cluster_network_subnet_reserved_ip_reference_model_json - ) + cluster_network_subnet_reserved_ip_reference_model_json2 = cluster_network_subnet_reserved_ip_reference_model.to_dict() + assert cluster_network_subnet_reserved_ip_reference_model_json2 == cluster_network_subnet_reserved_ip_reference_model_json class TestModel_DNSInstanceReferenceLoadBalancerDNSContext: @@ -59199,40 +58762,22 @@ def test_dns_instance_reference_load_balancer_dns_context_serialization(self): # 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::' - ) + 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 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 - ) + 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 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 - ) + 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_load_balancer_dns_context_model - == dns_instance_reference_load_balancer_dns_context_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_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 - ) + 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: @@ -59360,9 +58905,7 @@ def test_dedicated_host_serialization(self): instance_disk_reference_model = {} # InstanceDiskReference instance_disk_reference_model['deleted'] = deleted_model - instance_disk_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' - ) + instance_disk_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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' @@ -59370,9 +58913,7 @@ def test_dedicated_host_serialization(self): dedicated_host_disk_model = {} # DedicatedHostDisk dedicated_host_disk_model['available'] = 3200 dedicated_host_disk_model['created_at'] = '2024-11-04T17:05:47Z' - dedicated_host_disk_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a/disks/0717-bd091a9e-b036-4c65-a79b-56d164911f6e' - ) + dedicated_host_disk_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a/disks/0717-bd091a9e-b036-4c65-a79b-56d164911f6e' dedicated_host_disk_model['id'] = '0717-bd091a9e-b036-4c65-a79b-56d164911f6e' dedicated_host_disk_model['instance_disks'] = [instance_disk_reference_model] dedicated_host_disk_model['interface_type'] = 'nvme' @@ -59384,25 +58925,17 @@ def test_dedicated_host_serialization(self): dedicated_host_disk_model['supported_instance_interface_types'] = ['virtio_blk', 'nvme'] 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:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' - ) + dedicated_host_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' dedicated_host_group_reference_model['deleted'] = deleted_model - dedicated_host_group_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' - ) + dedicated_host_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' dedicated_host_group_reference_model['id'] = '0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' dedicated_host_group_reference_model['name'] = 'my-dedicated-host-group' dedicated_host_group_reference_model['resource_type'] = 'dedicated_host_group' instance_reference_model = {} # InstanceReference - instance_reference_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + instance_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' instance_reference_model['deleted'] = deleted_model - instance_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + instance_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' instance_reference_model['id'] = '0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' instance_reference_model['name'] = 'my-instance' @@ -59415,15 +58948,11 @@ def test_dedicated_host_serialization(self): 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_host/profiles/mx2-host-152x1216' - ) + dedicated_host_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles/mx2-host-152x1216' 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['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'Default' @@ -59441,14 +58970,10 @@ 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['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] @@ -59504,9 +59029,7 @@ def test_dedicated_host_collection_serialization(self): instance_disk_reference_model = {} # InstanceDiskReference instance_disk_reference_model['deleted'] = deleted_model - instance_disk_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' - ) + instance_disk_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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' @@ -59514,9 +59037,7 @@ def test_dedicated_host_collection_serialization(self): dedicated_host_disk_model = {} # DedicatedHostDisk dedicated_host_disk_model['available'] = 3200 dedicated_host_disk_model['created_at'] = '2024-11-04T17:05:47Z' - dedicated_host_disk_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a/disks/0717-bd091a9e-b036-4c65-a79b-56d164911f6e' - ) + dedicated_host_disk_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a/disks/0717-bd091a9e-b036-4c65-a79b-56d164911f6e' dedicated_host_disk_model['id'] = '0717-bd091a9e-b036-4c65-a79b-56d164911f6e' dedicated_host_disk_model['instance_disks'] = [instance_disk_reference_model] dedicated_host_disk_model['interface_type'] = 'nvme' @@ -59528,25 +59049,17 @@ def test_dedicated_host_collection_serialization(self): dedicated_host_disk_model['supported_instance_interface_types'] = ['virtio_blk', 'nvme'] 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:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' - ) + dedicated_host_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' dedicated_host_group_reference_model['deleted'] = deleted_model - dedicated_host_group_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' - ) + dedicated_host_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' dedicated_host_group_reference_model['id'] = '0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' dedicated_host_group_reference_model['name'] = 'my-dedicated-host-group' dedicated_host_group_reference_model['resource_type'] = 'dedicated_host_group' instance_reference_model = {} # InstanceReference - instance_reference_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + instance_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' instance_reference_model['deleted'] = deleted_model - instance_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + instance_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' instance_reference_model['id'] = '0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' instance_reference_model['name'] = 'my-instance' @@ -59559,15 +59072,11 @@ def test_dedicated_host_collection_serialization(self): 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_host/profiles/mx2-host-152x1216' - ) + dedicated_host_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles/mx2-host-152x1216' 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['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'Default' @@ -59584,14 +59093,10 @@ def test_dedicated_host_collection_serialization(self): dedicated_host_model['available_memory'] = 346 dedicated_host_model['available_vcpu'] = vcpu_model dedicated_host_model['created_at'] = '2024-11-04T19:38:33Z' - 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] @@ -59625,9 +59130,7 @@ def test_dedicated_host_collection_serialization(self): 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_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 @@ -59655,9 +59158,7 @@ def test_dedicated_host_disk_serialization(self): instance_disk_reference_model = {} # InstanceDiskReference instance_disk_reference_model['deleted'] = deleted_model - instance_disk_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' - ) + instance_disk_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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' @@ -59666,9 +59167,7 @@ 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/0717-1e09281b-f177-46fb-baf1-bc152b2e391a/disks/0717-bd091a9e-b036-4c65-a79b-56d164911f6e' - ) + dedicated_host_disk_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a/disks/0717-bd091a9e-b036-4c65-a79b-56d164911f6e' dedicated_host_disk_model_json['id'] = '0717-bd091a9e-b036-4c65-a79b-56d164911f6e' dedicated_host_disk_model_json['instance_disks'] = [instance_disk_reference_model] dedicated_host_disk_model_json['interface_type'] = 'nvme' @@ -59712,9 +59211,7 @@ def test_dedicated_host_disk_collection_serialization(self): instance_disk_reference_model = {} # InstanceDiskReference instance_disk_reference_model['deleted'] = deleted_model - instance_disk_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' - ) + instance_disk_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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' @@ -59722,9 +59219,7 @@ def test_dedicated_host_disk_collection_serialization(self): dedicated_host_disk_model = {} # DedicatedHostDisk dedicated_host_disk_model['available'] = 3200 dedicated_host_disk_model['created_at'] = '2024-11-04T17:05:47Z' - dedicated_host_disk_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a/disks/0717-bd091a9e-b036-4c65-a79b-56d164911f6e' - ) + dedicated_host_disk_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0717-1e09281b-f177-46fb-baf1-bc152b2e391a/disks/0717-bd091a9e-b036-4c65-a79b-56d164911f6e' dedicated_host_disk_model['id'] = '0717-bd091a9e-b036-4c65-a79b-56d164911f6e' dedicated_host_disk_model['instance_disks'] = [instance_disk_reference_model] dedicated_host_disk_model['interface_type'] = 'nvme' @@ -59740,15 +59235,11 @@ def test_dedicated_host_disk_collection_serialization(self): 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_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 @@ -59778,9 +59269,7 @@ def test_dedicated_host_disk_patch_serialization(self): 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_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 @@ -59807,21 +59296,15 @@ def test_dedicated_host_group_serialization(self): 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['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a' dedicated_host_reference_model['deleted'] = 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['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' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = ( - 'https://resource-controller.cloud.ibm.com/v2/resource_groups/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' @@ -59838,14 +59321,10 @@ def test_dedicated_host_group_serialization(self): dedicated_host_group_model_json = {} dedicated_host_group_model_json['class'] = 'bx2' 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:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' - ) + dedicated_host_group_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' - ) + dedicated_host_group_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' dedicated_host_group_model_json['id'] = '0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' dedicated_host_group_model_json['name'] = 'my-dedicated-host-group' dedicated_host_group_model_json['resource_group'] = resource_group_reference_model @@ -59888,21 +59367,15 @@ def test_dedicated_host_group_collection_serialization(self): 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['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a' dedicated_host_reference_model['deleted'] = 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['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' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = ( - 'https://resource-controller.cloud.ibm.com/v2/resource_groups/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' @@ -59918,14 +59391,10 @@ def test_dedicated_host_group_collection_serialization(self): dedicated_host_group_model = {} # DedicatedHostGroup dedicated_host_group_model['class'] = 'mx2' dedicated_host_group_model['created_at'] = '2024-11-04T21:29:25Z' - dedicated_host_group_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' - ) + dedicated_host_group_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' dedicated_host_group_model['dedicated_hosts'] = [dedicated_host_reference_model] dedicated_host_group_model['family'] = 'memory' - dedicated_host_group_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' - ) + dedicated_host_group_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' dedicated_host_group_model['id'] = '0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' dedicated_host_group_model['name'] = 'my-dedicated-host-group' dedicated_host_group_model['resource_group'] = resource_group_reference_model @@ -59942,18 +59411,12 @@ def test_dedicated_host_group_collection_serialization(self): 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 @@ -59982,9 +59445,7 @@ def test_dedicated_host_group_patch_serialization(self): 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_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 @@ -60013,44 +59474,22 @@ 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-dedicated-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['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 - ) + 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() - ) - assert ( - dedicated_host_group_prototype_dedicated_host_by_zone_context_model_json2 - == dedicated_host_group_prototype_dedicated_host_by_zone_context_model_json - ) + 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 class TestModel_DedicatedHostGroupReference: @@ -60070,27 +59509,19 @@ def test_dedicated_host_group_reference_serialization(self): # 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:0717-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:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' dedicated_host_group_reference_model_json['deleted'] = deleted_model - dedicated_host_group_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' - ) + dedicated_host_group_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' dedicated_host_group_reference_model_json['id'] = '0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' dedicated_host_group_reference_model_json['name'] = 'my-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_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 @@ -60158,9 +59589,7 @@ def test_dedicated_host_numa_node_serialization(self): 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_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 @@ -60234,9 +59663,7 @@ def test_dedicated_host_profile_serialization(self): 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_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' @@ -60268,9 +59695,7 @@ def test_dedicated_host_profile_serialization(self): dedicated_host_profile_model_json['class'] = 'bx2' 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['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 @@ -60331,9 +59756,7 @@ def test_dedicated_host_profile_collection_serialization(self): 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_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' @@ -60364,9 +59787,7 @@ def test_dedicated_host_profile_collection_serialization(self): dedicated_host_profile_model['class'] = 'mx2' dedicated_host_profile_model['disks'] = [dedicated_host_profile_disk_model] dedicated_host_profile_model['family'] = 'memory' - dedicated_host_profile_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles/mx2-host-152x1216' - ) + dedicated_host_profile_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles/mx2-host-152x1216' 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 @@ -60385,18 +59806,12 @@ def test_dedicated_host_profile_collection_serialization(self): 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 @@ -60439,18 +59854,14 @@ def test_dedicated_host_profile_disk_serialization(self): 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['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) 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_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 @@ -60477,18 +59888,12 @@ 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 @@ -60514,18 +59919,12 @@ 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 @@ -60551,18 +59950,12 @@ 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 @@ -60588,35 +59981,19 @@ def test_dedicated_host_profile_disk_supported_interfaces_serialization(self): 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 - ) + 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() - ) - assert ( - dedicated_host_profile_disk_supported_interfaces_model_json2 - == dedicated_host_profile_disk_supported_interfaces_model_json - ) + 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 class TestModel_DedicatedHostProfileReference: @@ -60631,24 +60008,16 @@ 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['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 @@ -60674,27 +60043,19 @@ 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() - assert ( - dedicated_host_profile_vcpu_architecture_model_json2 == dedicated_host_profile_vcpu_architecture_model_json - ) + assert dedicated_host_profile_vcpu_architecture_model_json2 == dedicated_host_profile_vcpu_architecture_model_json class TestModel_DedicatedHostProfileVCPUManufacturer: @@ -60713,27 +60074,19 @@ 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() - assert ( - dedicated_host_profile_vcpu_manufacturer_model_json2 == dedicated_host_profile_vcpu_manufacturer_model_json - ) + assert dedicated_host_profile_vcpu_manufacturer_model_json2 == dedicated_host_profile_vcpu_manufacturer_model_json class TestModel_DedicatedHostReference: @@ -60753,13 +60106,9 @@ def test_dedicated_host_reference_serialization(self): # 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['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'] = 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['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' @@ -60769,9 +60118,7 @@ def test_dedicated_host_reference_serialization(self): 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_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 @@ -60795,36 +60142,30 @@ 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['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['name'] = 'Default' deleted_model = {} # Deleted deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' network_acl_rule_reference_model = {} # NetworkACLRuleReference network_acl_rule_reference_model['deleted'] = 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_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model['id'] = 'r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model['name'] = 'my-allow-inbound-rule' 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['created_at'] = '2024-12-11T06:26:17Z' + network_acl_rule_item_model['destination'] = '0.0.0.0/0' 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/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_item_model['id'] = 'r006-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' + network_acl_rule_item_model['name'] = 'my-allow-inbound-rule' + network_acl_rule_item_model['source'] = '0.0.0.0/0' network_acl_rule_item_model['destination_port_max'] = 22 network_acl_rule_item_model['destination_port_min'] = 22 network_acl_rule_item_model['protocol'] = 'udp' @@ -60832,25 +60173,17 @@ def test_default_network_acl_serialization(self): network_acl_rule_item_model['source_port_min'] = 49152 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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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_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'] = 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' @@ -60858,12 +60191,8 @@ 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['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 @@ -60903,9 +60232,7 @@ def test_default_routing_table_serialization(self): resource_filter_model['resource_type'] = 'vpn_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['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'Default' @@ -60914,22 +60241,16 @@ def test_default_routing_table_serialization(self): route_reference_model = {} # RouteReference route_reference_model['deleted'] = 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['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_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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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['name'] = 'my-subnet-z1-1' subnet_reference_model['resource_type'] = 'subnet' # Construct a json representation of a DefaultRoutingTable model @@ -60937,12 +60258,8 @@ def test_default_routing_table_serialization(self): 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['crn'] = ( - 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/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' @@ -60985,9 +60302,7 @@ 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['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'Default' @@ -60999,9 +60314,7 @@ def test_default_security_group_serialization(self): security_group_rule_model = {} # SecurityGroupRuleSecurityGroupRuleProtocolAll security_group_rule_model['direction'] = 'outbound' - security_group_rule_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-ad713e2d-9a80-4218-85a2-1f192b41b2c4' - ) + security_group_rule_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-ad713e2d-9a80-4218-85a2-1f192b41b2c4' security_group_rule_model['id'] = 'r006-ad713e2d-9a80-4218-85a2-1f192b41b2c4' security_group_rule_model['ip_version'] = 'ipv4' security_group_rule_model['local'] = security_group_rule_local_model @@ -61013,21 +60326,15 @@ def test_default_security_group_serialization(self): security_group_target_reference_model = {} # SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext security_group_target_reference_model['deleted'] = deleted_model - security_group_target_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - ) + security_group_target_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' security_group_target_reference_model['id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' security_group_target_reference_model['name'] = 'my-instance-network-interface' security_group_target_reference_model['resource_type'] = 'network_interface' 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'] = 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' @@ -61035,12 +60342,8 @@ 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['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 @@ -61106,18 +60409,14 @@ 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) 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_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 @@ -61144,37 +60443,27 @@ def test_endpoint_gateway_serialization(self): 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['address'] = '10.0.1.5' reserved_ip_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/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['name'] = 'my-reserved-ip-z1' 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['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['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['name'] = 'Default' 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_reference_model['deleted'] = 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['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' @@ -61191,26 +60480,18 @@ def test_endpoint_gateway_serialization(self): private_path_service_gateway_remote_model['region'] = region_reference_model endpoint_gateway_target_model = {} # EndpointGatewayTargetPrivatePathServiceGatewayReference - endpoint_gateway_target_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213' - ) + endpoint_gateway_target_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5' endpoint_gateway_target_model['deleted'] = deleted_model - endpoint_gateway_target_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213' - ) - endpoint_gateway_target_model['id'] = 'r134-fb880975-db45-4459-8548-64e3995ac213' - endpoint_gateway_target_model['name'] = 'my-private-path-service-gateway' + endpoint_gateway_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5' + endpoint_gateway_target_model['id'] = 'r006-7268d425-59b7-48fd-9735-81a7271657d5' + endpoint_gateway_target_model['name'] = 'ibm-ntp-server' endpoint_gateway_target_model['remote'] = private_path_service_gateway_remote_model - endpoint_gateway_target_model['resource_type'] = 'private_path_service_gateway' + endpoint_gateway_target_model['resource_type'] = 'provider_infrastructure_service' 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'] = 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' @@ -61219,14 +60500,10 @@ 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:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' 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/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' + endpoint_gateway_model_json['id'] = 'r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' 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_state'] = 'stable' @@ -61271,37 +60548,27 @@ def test_endpoint_gateway_collection_serialization(self): 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['address'] = '10.0.1.5' reserved_ip_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/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['name'] = 'my-reserved-ip-z1' 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['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['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['name'] = 'Default' 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_reference_model['deleted'] = 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['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' @@ -61318,41 +60585,29 @@ def test_endpoint_gateway_collection_serialization(self): private_path_service_gateway_remote_model['region'] = region_reference_model endpoint_gateway_target_model = {} # EndpointGatewayTargetPrivatePathServiceGatewayReference - endpoint_gateway_target_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213' - ) + endpoint_gateway_target_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5' endpoint_gateway_target_model['deleted'] = deleted_model - endpoint_gateway_target_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213' - ) - endpoint_gateway_target_model['id'] = 'r134-fb880975-db45-4459-8548-64e3995ac213' - endpoint_gateway_target_model['name'] = 'my-private-path-service-gateway' + endpoint_gateway_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5' + endpoint_gateway_target_model['id'] = 'r006-7268d425-59b7-48fd-9735-81a7271657d5' + endpoint_gateway_target_model['name'] = 'ibm-ntp-server' endpoint_gateway_target_model['remote'] = private_path_service_gateway_remote_model - endpoint_gateway_target_model['resource_type'] = 'private_path_service_gateway' + endpoint_gateway_target_model['resource_type'] = 'provider_infrastructure_service' 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'] = 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' 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['created_at'] = '2024-11-20T19:42:46Z' + endpoint_gateway_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' 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/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' + endpoint_gateway_model['id'] = 'r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' endpoint_gateway_model['ips'] = [reserved_ip_reference_model] endpoint_gateway_model['lifecycle_reasons'] = [endpoint_gateway_lifecycle_reason_model] endpoint_gateway_model['lifecycle_state'] = 'stable' @@ -61361,12 +60616,12 @@ def test_endpoint_gateway_collection_serialization(self): 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['service_endpoints'] = ['time.adn.networklayer.com'] endpoint_gateway_model['target'] = endpoint_gateway_target_model endpoint_gateway_model['vpc'] = vpc_reference_model page_link_model = {} # PageLink - page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways?limit=20' + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways?limit=50' # Construct a json representation of a EndpointGatewayCollection model endpoint_gateway_collection_model_json = {} @@ -61381,9 +60636,7 @@ def test_endpoint_gateway_collection_serialization(self): 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_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 @@ -61407,26 +60660,16 @@ 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['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 @@ -61493,30 +60736,20 @@ 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' + endpoint_gateway_reference_remote_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' + endpoint_gateway_reference_remote_model_json['id'] = 'r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' 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 @@ -61556,9 +60789,7 @@ def test_endpoint_gateway_remote_serialization(self): 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_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 @@ -61582,9 +60813,7 @@ 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['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'Default' @@ -61592,40 +60821,20 @@ def test_floating_ip_serialization(self): deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference - reserved_ip_reference_model['address'] = '10.0.1.5' + reserved_ip_reference_model['address'] = '192.168.3.4' reserved_ip_reference_model['deleted'] = deleted_model - reserved_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - ) + 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_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['deleted'] = 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['name'] = 'my-subnet' - subnet_reference_model['resource_type'] = 'subnet' - - floating_ip_target_model = {} # FloatingIPTargetVirtualNetworkInterfaceReference - floating_ip_target_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) + floating_ip_target_model = {} # FloatingIPTargetNetworkInterfaceReference floating_ip_target_model['deleted'] = deleted_model - floating_ip_target_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) - floating_ip_target_model['id'] = '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - floating_ip_target_model['name'] = 'my-virtual-network-interface' + floating_ip_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' + floating_ip_target_model['id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' + 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'] = 'virtual_network_interface' - floating_ip_target_model['subnet'] = subnet_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' @@ -61635,12 +60844,8 @@ def test_floating_ip_serialization(self): 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:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) - floating_ip_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) + floating_ip_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' + floating_ip_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' floating_ip_model_json['id'] = 'r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' floating_ip_model_json['name'] = 'my-floating-ip' floating_ip_model_json['resource_group'] = resource_group_reference_model @@ -61680,9 +60885,7 @@ def test_floating_ip_collection_serialization(self): page_link_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['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'Default' @@ -61690,40 +60893,20 @@ def test_floating_ip_collection_serialization(self): deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference - reserved_ip_reference_model['address'] = '10.0.1.5' + reserved_ip_reference_model['address'] = '192.168.3.4' reserved_ip_reference_model['deleted'] = deleted_model - reserved_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - ) + 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_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['deleted'] = 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['name'] = 'my-subnet' - subnet_reference_model['resource_type'] = 'subnet' - - floating_ip_target_model = {} # FloatingIPTargetVirtualNetworkInterfaceReference - floating_ip_target_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) + floating_ip_target_model = {} # FloatingIPTargetNetworkInterfaceReference floating_ip_target_model['deleted'] = deleted_model - floating_ip_target_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) - floating_ip_target_model['id'] = '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - floating_ip_target_model['name'] = 'my-virtual-network-interface' + floating_ip_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' + floating_ip_target_model['id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' + 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'] = 'virtual_network_interface' - floating_ip_target_model['subnet'] = subnet_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' @@ -61732,12 +60915,8 @@ def test_floating_ip_collection_serialization(self): floating_ip_model = {} # FloatingIP floating_ip_model['address'] = '203.0.113.1' floating_ip_model['created_at'] = '2024-10-15T12:08:05Z' - floating_ip_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) - floating_ip_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) + floating_ip_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' + floating_ip_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' floating_ip_model['id'] = 'r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' floating_ip_model['name'] = 'my-floating-ip' floating_ip_model['resource_group'] = resource_group_reference_model @@ -61782,69 +60961,41 @@ def test_floating_ip_collection_virtual_network_interface_context_serialization( # Construct dict forms of any model objects needed in order to build this model. page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef/floating_ips?limit=50' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef/floating_ips?limit=50' deleted_model = {} # Deleted 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:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) + floating_ip_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' floating_ip_reference_model['deleted'] = deleted_model - floating_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) + floating_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' floating_ip_reference_model['id'] = 'r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' floating_ip_reference_model['name'] = 'my-floating-ip' # 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'] = page_link_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['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'] = page_link_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 - ) + 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() - ) - assert ( - floating_ip_collection_virtual_network_interface_context_model_json2 - == floating_ip_collection_virtual_network_interface_context_model_json - ) + 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 class TestModel_FloatingIPPatch: @@ -61859,9 +61010,7 @@ 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 = {} # FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById floating_ip_target_patch_model['id'] = '0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' # Construct a json representation of a FloatingIPPatch model @@ -61903,13 +61052,9 @@ def test_floating_ip_reference_serialization(self): # 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:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) + floating_ip_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' floating_ip_reference_model_json['deleted'] = deleted_model - floating_ip_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) + floating_ip_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' floating_ip_reference_model_json['id'] = 'r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' floating_ip_reference_model_json['name'] = 'my-floating-ip' @@ -61942,9 +61087,7 @@ 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['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'Default' @@ -61952,40 +61095,20 @@ def test_floating_ip_unpaginated_collection_serialization(self): deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' reserved_ip_reference_model = {} # ReservedIPReference - reserved_ip_reference_model['address'] = '10.0.1.5' + reserved_ip_reference_model['address'] = '192.168.3.4' reserved_ip_reference_model['deleted'] = deleted_model - reserved_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - ) + 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_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['deleted'] = 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['name'] = 'my-subnet' - subnet_reference_model['resource_type'] = 'subnet' - - floating_ip_target_model = {} # FloatingIPTargetVirtualNetworkInterfaceReference - floating_ip_target_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) + floating_ip_target_model = {} # FloatingIPTargetNetworkInterfaceReference floating_ip_target_model['deleted'] = deleted_model - floating_ip_target_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) - floating_ip_target_model['id'] = '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - floating_ip_target_model['name'] = 'my-virtual-network-interface' + floating_ip_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' + floating_ip_target_model['id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' + 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'] = 'virtual_network_interface' - floating_ip_target_model['subnet'] = subnet_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' @@ -61994,12 +61117,8 @@ def test_floating_ip_unpaginated_collection_serialization(self): floating_ip_model = {} # FloatingIP floating_ip_model['address'] = '203.0.113.1' floating_ip_model['created_at'] = '2024-10-15T12:08:05Z' - floating_ip_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) - floating_ip_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) + floating_ip_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' + floating_ip_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' floating_ip_model['id'] = 'r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' floating_ip_model['name'] = 'my-floating-ip' floating_ip_model['resource_group'] = resource_group_reference_model @@ -62012,18 +61131,12 @@ def test_floating_ip_unpaginated_collection_serialization(self): 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 @@ -62046,11 +61159,9 @@ 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['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['name'] = 'Default' legacy_cloud_object_storage_bucket_reference_model = {} # LegacyCloudObjectStorageBucketReference legacy_cloud_object_storage_bucket_reference_model['name'] = 'bucket-27200-lwx4cfvcue' @@ -62058,23 +61169,18 @@ def test_flow_log_collector_serialization(self): deleted_model = {} # Deleted deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - flow_log_collector_target_model = {} # FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext + flow_log_collector_target_model = {} # FlowLogCollectorTargetSubnetReference + flow_log_collector_target_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' flow_log_collector_target_model['deleted'] = deleted_model - flow_log_collector_target_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - ) - flow_log_collector_target_model['id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - flow_log_collector_target_model['name'] = 'my-instance-network-interface' - flow_log_collector_target_model['resource_type'] = 'network_interface' + flow_log_collector_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + flow_log_collector_target_model['id'] = '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + flow_log_collector_target_model['name'] = 'my-virtual-network-interface' + flow_log_collector_target_model['resource_type'] = 'virtual_network_interface' 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'] = 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' @@ -62084,13 +61190,9 @@ 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:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80' + flow_log_collector_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80' + flow_log_collector_model_json['id'] = 'r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80' 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 @@ -62127,14 +61229,12 @@ def test_flow_log_collector_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. page_link_model = {} # PageLink - page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?limit=20' + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?limit=50' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = ( - 'https://resource-controller.cloud.ibm.com/v2/resource_groups/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' + resource_group_reference_model['name'] = 'Default' legacy_cloud_object_storage_bucket_reference_model = {} # LegacyCloudObjectStorageBucketReference legacy_cloud_object_storage_bucket_reference_model['name'] = 'bucket-27200-lwx4cfvcue' @@ -62142,23 +61242,18 @@ def test_flow_log_collector_collection_serialization(self): deleted_model = {} # Deleted deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' - flow_log_collector_target_model = {} # FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext + flow_log_collector_target_model = {} # FlowLogCollectorTargetSubnetReference + flow_log_collector_target_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' flow_log_collector_target_model['deleted'] = deleted_model - flow_log_collector_target_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - ) - flow_log_collector_target_model['id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - flow_log_collector_target_model['name'] = 'my-instance-network-interface' - flow_log_collector_target_model['resource_type'] = 'network_interface' + flow_log_collector_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + flow_log_collector_target_model['id'] = '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + flow_log_collector_target_model['name'] = 'my-virtual-network-interface' + flow_log_collector_target_model['resource_type'] = 'virtual_network_interface' 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'] = 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' @@ -62166,14 +61261,10 @@ def test_flow_log_collector_collection_serialization(self): flow_log_collector_model = {} # FlowLogCollector 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['id'] = '39300233-9995-4806-89a5-3c1b6eb88689' + flow_log_collector_model['created_at'] = '2024-11-06T12:08:05Z' + flow_log_collector_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::flow-log-collector:r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80' + flow_log_collector_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80' + flow_log_collector_model['id'] = 'r006-ad0cded3-53a3-4d4a-9809-8c59b50d2b80' 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 @@ -62190,15 +61281,11 @@ def test_flow_log_collector_collection_serialization(self): 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_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 @@ -62229,9 +61316,7 @@ def test_flow_log_collector_patch_serialization(self): 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_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 @@ -62259,17 +61344,13 @@ def test_ike_policy_serialization(self): vpn_gateway_connection_reference_model = {} # VPNGatewayConnectionReference vpn_gateway_connection_reference_model['deleted'] = 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['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' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = ( - 'https://resource-controller.cloud.ibm.com/v2/resource_groups/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' @@ -62280,9 +61361,7 @@ def test_ike_policy_serialization(self): 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 @@ -62327,17 +61406,13 @@ def test_ike_policy_collection_serialization(self): vpn_gateway_connection_reference_model = {} # VPNGatewayConnectionReference vpn_gateway_connection_reference_model['deleted'] = 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['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' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = ( - 'https://resource-controller.cloud.ibm.com/v2/resource_groups/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' @@ -62347,9 +61422,7 @@ def test_ike_policy_collection_serialization(self): 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 @@ -62404,34 +61477,24 @@ def test_ike_policy_connection_collection_serialization(self): ike_policy_reference_model = {} # IKEPolicyReference ike_policy_reference_model['deleted'] = 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['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_model = {} # IPsecPolicyReference i_psec_policy_reference_model['deleted'] = 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['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_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 = {} # VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN vpn_gateway_connection_ike_identity_model['type'] = 'ipv4_address' vpn_gateway_connection_ike_identity_model['value'] = '192.0.2.4' @@ -62439,9 +61502,7 @@ def test_ike_policy_connection_collection_serialization(self): 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 = {} # 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' @@ -62453,9 +61514,7 @@ def test_ike_policy_connection_collection_serialization(self): 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['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 @@ -62469,9 +61528,7 @@ def test_ike_policy_connection_collection_serialization(self): vpn_gateway_connection_model['peer'] = vpn_gateway_connection_policy_mode_peer_model page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies/e98f46a3-1e4e-4195-b4e5-b8155192689d/connections?limit=20' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies/e98f46a3-1e4e-4195-b4e5-b8155192689d/connections?limit=20' # Construct a json representation of a IKEPolicyConnectionCollection model ike_policy_connection_collection_model_json = {} @@ -62482,18 +61539,12 @@ def test_ike_policy_connection_collection_serialization(self): 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 - ) + 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 - ) + 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 @@ -62556,9 +61607,7 @@ def test_ike_policy_reference_serialization(self): # Construct a json representation of a IKEPolicyReference model ike_policy_reference_model_json = {} ike_policy_reference_model_json['deleted'] = 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['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' @@ -62626,17 +61675,13 @@ def test_i_psec_policy_serialization(self): vpn_gateway_connection_reference_model = {} # VPNGatewayConnectionReference vpn_gateway_connection_reference_model['deleted'] = 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['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' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = ( - 'https://resource-controller.cloud.ibm.com/v2/resource_groups/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' @@ -62647,9 +61692,7 @@ def test_i_psec_policy_serialization(self): 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' @@ -62694,17 +61737,13 @@ def test_i_psec_policy_collection_serialization(self): vpn_gateway_connection_reference_model = {} # VPNGatewayConnectionReference vpn_gateway_connection_reference_model['deleted'] = 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['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' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = ( - 'https://resource-controller.cloud.ibm.com/v2/resource_groups/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' @@ -62714,9 +61753,7 @@ def test_i_psec_policy_collection_serialization(self): 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' @@ -62738,9 +61775,7 @@ def test_i_psec_policy_collection_serialization(self): 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_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 @@ -62773,34 +61808,24 @@ def test_i_psec_policy_connection_collection_serialization(self): ike_policy_reference_model = {} # IKEPolicyReference ike_policy_reference_model['deleted'] = 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['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_model = {} # IPsecPolicyReference i_psec_policy_reference_model['deleted'] = 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['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_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 = {} # VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN vpn_gateway_connection_ike_identity_model['type'] = 'ipv4_address' vpn_gateway_connection_ike_identity_model['value'] = '192.0.2.4' @@ -62808,9 +61833,7 @@ def test_i_psec_policy_connection_collection_serialization(self): 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 = {} # 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' @@ -62822,9 +61845,7 @@ def test_i_psec_policy_connection_collection_serialization(self): 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['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 @@ -62838,9 +61859,7 @@ def test_i_psec_policy_connection_collection_serialization(self): vpn_gateway_connection_model['peer'] = vpn_gateway_connection_policy_mode_peer_model page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/43c2f663-3960-4289-9253-f6eab23a6cd7/connections?limit=20' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/43c2f663-3960-4289-9253-f6eab23a6cd7/connections?limit=20' # Construct a json representation of a IPsecPolicyConnectionCollection model i_psec_policy_connection_collection_model_json = {} @@ -62851,18 +61870,12 @@ def test_i_psec_policy_connection_collection_serialization(self): 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 - ) + 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 - ) + 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 @@ -62924,9 +61937,7 @@ def test_i_psec_policy_reference_serialization(self): # Construct a json representation of a IPsecPolicyReference model i_psec_policy_reference_model_json = {} i_psec_policy_reference_model_json['deleted'] = 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['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' @@ -62960,18 +61971,14 @@ 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['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'] = False 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' @@ -62993,9 +62000,7 @@ def test_image_serialization(self): operating_system_model['version'] = '24.04 LTS Noble Numbat Minimal Install' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = ( - 'https://resource-controller.cloud.ibm.com/v2/resource_groups/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' @@ -63010,13 +62015,9 @@ def test_image_serialization(self): 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'] = deleted_model - volume_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/volumes/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 @@ -63031,16 +62032,12 @@ def test_image_serialization(self): 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' @@ -63083,9 +62080,7 @@ 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['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 = {} @@ -63124,18 +62119,14 @@ def test_image_collection_serialization(self): page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images?limit=50' 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['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'] = False 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' @@ -63157,9 +62148,7 @@ def test_image_collection_serialization(self): operating_system_model['version'] = '24.04 LTS Noble Numbat Minimal Install' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = ( - 'https://resource-controller.cloud.ibm.com/v2/resource_groups/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' @@ -63174,13 +62163,9 @@ def test_image_collection_serialization(self): 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'] = deleted_model - volume_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/volumes/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 @@ -63194,9 +62179,7 @@ def test_image_collection_serialization(self): image_model = {} # Image image_model['catalog_offering'] = image_catalog_offering_model image_model['created_at'] = '2024-09-13T09:06:26Z' - 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'] = 'none' image_model['encryption_key'] = encryption_key_reference_model @@ -63254,18 +62237,14 @@ def test_image_export_job_serialization(self): image_export_job_status_reason_model = {} # ImageExportJobStatusReason 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' - ) + 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['crn'] = 'crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:bucket-27200-lwx4cfvcue' 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' + cloud_object_storage_object_reference_model['name'] = 'my-image-export.qcow2' # Construct a json representation of a ImageExportJob model image_export_job_model_json = {} @@ -63273,11 +62252,9 @@ def test_image_export_job_serialization(self): 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['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['name'] = 'my-image-export' + image_export_job_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r006-095e9baf-01d4-4e29-986e-20d26606b82a' + image_export_job_model_json['id'] = 'r006-095e9baf-01d4-4e29-986e-20d26606b82a' + image_export_job_model_json['name'] = 'my-image-export-job' 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' @@ -63314,7 +62291,7 @@ def test_image_export_job_patch_serialization(self): # Construct a json representation of a ImageExportJobPatch model image_export_job_patch_model_json = {} - image_export_job_patch_model_json['name'] = 'my-image-export' + image_export_job_patch_model_json['name'] = 'my-image-export-job' # 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) @@ -63346,20 +62323,14 @@ def test_image_export_job_status_reason_serialization(self): 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['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_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 @@ -63385,32 +62356,26 @@ def test_image_export_job_unpaginated_collection_serialization(self): image_export_job_status_reason_model = {} # ImageExportJobStatusReason 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' - ) + 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['crn'] = 'crn:v1:bluemix:public:cloud-object-storage:global:a/aa2432b1fa4d4ace891e9b80fc104e34:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:bucket-27200-lwx4cfvcue' 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' + cloud_object_storage_object_reference_model['name'] = 'my-image-export.qcow2' 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['created_at'] = '2024-12-09T01:09:02Z' 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/r006-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8/export_jobs/r006-095e9baf-01d4-4e29-986e-20d26606b82a' + image_export_job_model['id'] = 'r006-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'] = 'queued' 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' @@ -63421,18 +62386,12 @@ def test_image_export_job_unpaginated_collection_serialization(self): 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 @@ -63599,13 +62558,9 @@ 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'] = 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['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 @@ -63682,9 +62637,7 @@ 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) @@ -63724,13 +62677,9 @@ def test_instance_serialization(self): volume_attachment_device_model['id'] = '0717-80b3e36e-41f4-40e9-bd56-beae81792a68-679qb' 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['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'] = 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['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' @@ -63738,65 +62687,47 @@ def test_instance_serialization(self): volume_attachment_reference_instance_context_model = {} # VolumeAttachmentReferenceInstanceContext volume_attachment_reference_instance_context_model['deleted'] = 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' - ) + volume_attachment_reference_instance_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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_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['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'] = 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' - ) + 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['plan'] = catalog_offering_version_plan_reference_model instance_catalog_offering_model['version'] = catalog_offering_version_reference_model cluster_network_reference_model = {} # ClusterNetworkReference - cluster_network_reference_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573' - ) + cluster_network_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573' cluster_network_reference_model['deleted'] = deleted_model - cluster_network_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573' - ) + cluster_network_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573' cluster_network_reference_model['id'] = '0717-da0df18c-7598-4633-a648-fdaac28a5573' cluster_network_reference_model['name'] = 'my-cluster-network' cluster_network_reference_model['resource_type'] = 'cluster_network' instance_cluster_network_attachment_reference_model = {} # InstanceClusterNetworkAttachmentReference - instance_cluster_network_attachment_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213' - ) + instance_cluster_network_attachment_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213' instance_cluster_network_attachment_reference_model['id'] = '0717-fb880975-db45-4459-8548-64e3995ac213' instance_cluster_network_attachment_reference_model['name'] = 'my-instance-network-attachment' instance_cluster_network_attachment_reference_model['resource_type'] = 'instance_cluster_network_attachment' 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['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a' dedicated_host_reference_model['deleted'] = 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['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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' - ) + instance_disk_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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' @@ -63812,9 +62743,7 @@ 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-server-health-status-reasons' - ) + instance_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons' account_reference_model = {} # AccountReference account_reference_model['id'] = 'bb1b52262f7441a586f49068482f1e60' @@ -63829,13 +62758,9 @@ 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'] = deleted_model - image_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/images/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 @@ -63843,9 +62768,7 @@ def test_instance_serialization(self): 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['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 @@ -63856,57 +62779,39 @@ def test_instance_serialization(self): reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.0.1.5' reserved_ip_reference_model['deleted'] = deleted_model - reserved_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - ) + reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/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['name'] = 'my-reserved-ip-z1' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' 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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) - virtual_network_interface_reference_attachment_context_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) + 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + virtual_network_interface_reference_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' virtual_network_interface_reference_attachment_context_model['id'] = '0717-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_reference_model = {} # InstanceNetworkAttachmentReference instance_network_attachment_reference_model['deleted'] = deleted_model - instance_network_attachment_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - ) + instance_network_attachment_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-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 - instance_network_attachment_reference_model['virtual_network_interface'] = ( - virtual_network_interface_reference_attachment_context_model - ) + instance_network_attachment_reference_model['virtual_network_interface'] = virtual_network_interface_reference_attachment_context_model network_interface_instance_context_reference_model = {} # NetworkInterfaceInstanceContextReference network_interface_instance_context_reference_model['deleted'] = deleted_model - network_interface_instance_context_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - ) + network_interface_instance_context_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' network_interface_instance_context_reference_model['id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' network_interface_instance_context_reference_model['name'] = 'my-instance-network-interface' network_interface_instance_context_reference_model['primary_ip'] = reserved_ip_reference_model @@ -63914,13 +62819,9 @@ def test_instance_serialization(self): network_interface_instance_context_reference_model['subnet'] = subnet_reference_model 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['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_placement_target_model['deleted'] = 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['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' @@ -63931,13 +62832,9 @@ def test_instance_serialization(self): instance_profile_reference_model['resource_type'] = 'instance_profile' reservation_reference_model = {} # ReservationReference - reservation_reference_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63' - ) + reservation_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63' reservation_reference_model['deleted'] = deleted_model - reservation_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63' - ) + reservation_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63' reservation_reference_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' reservation_reference_model['name'] = 'my-reservation' reservation_reference_model['resource_type'] = 'reservation' @@ -63947,20 +62844,14 @@ def test_instance_serialization(self): 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['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' @@ -63968,13 +62859,9 @@ def test_instance_serialization(self): instance_vcpu_model['manufacturer'] = 'intel' 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'] = 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' @@ -63993,18 +62880,14 @@ def test_instance_serialization(self): instance_model_json['cluster_network_attachments'] = [instance_cluster_network_attachment_reference_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_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + instance_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + instance_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' instance_model_json['id'] = '0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' instance_model_json['image'] = image_reference_model instance_model_json['lifecycle_reasons'] = [instance_lifecycle_reason_model] @@ -64064,9 +62947,7 @@ 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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/actions/109a1b6e-1242-4de1-be44-38705e9474ed' - ) + instance_action_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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' @@ -64103,15 +62984,11 @@ 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_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 @@ -64137,18 +63014,12 @@ def test_instance_availability_policy_patch_serialization(self): 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 @@ -64173,18 +63044,12 @@ def test_instance_availability_policy_prototype_serialization(self): 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 @@ -64210,15 +63075,11 @@ def test_instance_catalog_offering_serialization(self): 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['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'] = 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' - ) + 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 = {} @@ -64230,9 +63091,7 @@ def test_instance_catalog_offering_serialization(self): 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_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 @@ -64256,9 +63115,7 @@ def test_instance_cluster_network_attachment_serialization(self): # Construct dict forms of any model objects needed in order to build this model. instance_cluster_network_attachment_before_model = {} # InstanceClusterNetworkAttachmentBefore - instance_cluster_network_attachment_before_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-a69563fa-0415-4d6e-aeb3-a3f14654bf90' - ) + instance_cluster_network_attachment_before_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-a69563fa-0415-4d6e-aeb3-a3f14654bf90' instance_cluster_network_attachment_before_model['id'] = '0717-a69563fa-0415-4d6e-aeb3-a3f14654bf90' instance_cluster_network_attachment_before_model['name'] = 'other-instance-cluster-network-attachment' instance_cluster_network_attachment_before_model['resource_type'] = 'instance_cluster_network_attachment' @@ -64269,74 +63126,50 @@ def test_instance_cluster_network_attachment_serialization(self): cluster_network_subnet_reserved_ip_reference_model = {} # ClusterNetworkSubnetReservedIPReference cluster_network_subnet_reserved_ip_reference_model['address'] = '10.1.0.6' cluster_network_subnet_reserved_ip_reference_model['deleted'] = deleted_model - cluster_network_subnet_reserved_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/63341ffa-1037-4b50-be40-676e3e9ac0c7' - ) + cluster_network_subnet_reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/63341ffa-1037-4b50-be40-676e3e9ac0c7' cluster_network_subnet_reserved_ip_reference_model['id'] = '63341ffa-1037-4b50-be40-676e3e9ac0c7' cluster_network_subnet_reserved_ip_reference_model['name'] = 'my-cluster-network-subnet-reserved-ip' cluster_network_subnet_reserved_ip_reference_model['resource_type'] = 'cluster_network_subnet_reserved_ip' cluster_network_subnet_reference_model = {} # ClusterNetworkSubnetReference cluster_network_subnet_reference_model['deleted'] = deleted_model - cluster_network_subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - ) + cluster_network_subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' cluster_network_subnet_reference_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' cluster_network_subnet_reference_model['name'] = 'my-cluster-network-subnet' cluster_network_subnet_reference_model['resource_type'] = 'cluster_network_subnet' cluster_network_interface_reference_model = {} # ClusterNetworkInterfaceReference cluster_network_interface_reference_model['deleted'] = deleted_model - cluster_network_interface_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb' - ) + cluster_network_interface_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb' cluster_network_interface_reference_model['id'] = '0717-ffc092f7-5d02-4b93-ab69-26860529b9fb' cluster_network_interface_reference_model['name'] = 'my-cluster-network-interface' cluster_network_interface_reference_model['primary_ip'] = cluster_network_subnet_reserved_ip_reference_model cluster_network_interface_reference_model['resource_type'] = 'cluster_network_interface' cluster_network_interface_reference_model['subnet'] = cluster_network_subnet_reference_model - instance_cluster_network_attachment_lifecycle_reason_model = ( - {} - ) # InstanceClusterNetworkAttachmentLifecycleReason + instance_cluster_network_attachment_lifecycle_reason_model = {} # InstanceClusterNetworkAttachmentLifecycleReason instance_cluster_network_attachment_lifecycle_reason_model['code'] = 'resource_suspended_by_provider' - instance_cluster_network_attachment_lifecycle_reason_model['message'] = ( - 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - ) - instance_cluster_network_attachment_lifecycle_reason_model['more_info'] = ( - 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' - ) + instance_cluster_network_attachment_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + instance_cluster_network_attachment_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' # Construct a json representation of a InstanceClusterNetworkAttachment model instance_cluster_network_attachment_model_json = {} instance_cluster_network_attachment_model_json['before'] = instance_cluster_network_attachment_before_model - instance_cluster_network_attachment_model_json['cluster_network_interface'] = ( - cluster_network_interface_reference_model - ) - instance_cluster_network_attachment_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213' - ) + instance_cluster_network_attachment_model_json['cluster_network_interface'] = cluster_network_interface_reference_model + instance_cluster_network_attachment_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213' instance_cluster_network_attachment_model_json['id'] = '0717-fb880975-db45-4459-8548-64e3995ac213' - instance_cluster_network_attachment_model_json['lifecycle_reasons'] = [ - instance_cluster_network_attachment_lifecycle_reason_model - ] + instance_cluster_network_attachment_model_json['lifecycle_reasons'] = [instance_cluster_network_attachment_lifecycle_reason_model] instance_cluster_network_attachment_model_json['lifecycle_state'] = 'stable' instance_cluster_network_attachment_model_json['name'] = 'my-instance-network-attachment' instance_cluster_network_attachment_model_json['resource_type'] = 'instance_cluster_network_attachment' # Construct a model instance of InstanceClusterNetworkAttachment by calling from_dict on the json representation - instance_cluster_network_attachment_model = InstanceClusterNetworkAttachment.from_dict( - instance_cluster_network_attachment_model_json - ) + instance_cluster_network_attachment_model = InstanceClusterNetworkAttachment.from_dict(instance_cluster_network_attachment_model_json) assert instance_cluster_network_attachment_model != False # Construct a model instance of InstanceClusterNetworkAttachment by calling from_dict on the json representation - instance_cluster_network_attachment_model_dict = InstanceClusterNetworkAttachment.from_dict( - instance_cluster_network_attachment_model_json - ).__dict__ - instance_cluster_network_attachment_model2 = InstanceClusterNetworkAttachment( - **instance_cluster_network_attachment_model_dict - ) + instance_cluster_network_attachment_model_dict = InstanceClusterNetworkAttachment.from_dict(instance_cluster_network_attachment_model_json).__dict__ + instance_cluster_network_attachment_model2 = InstanceClusterNetworkAttachment(**instance_cluster_network_attachment_model_dict) # Verify the model instances are equivalent assert instance_cluster_network_attachment_model == instance_cluster_network_attachment_model2 @@ -64358,38 +63191,25 @@ def test_instance_cluster_network_attachment_before_serialization(self): # Construct a json representation of a InstanceClusterNetworkAttachmentBefore model instance_cluster_network_attachment_before_model_json = {} - instance_cluster_network_attachment_before_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213' - ) + instance_cluster_network_attachment_before_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213' instance_cluster_network_attachment_before_model_json['id'] = '0717-fb880975-db45-4459-8548-64e3995ac213' instance_cluster_network_attachment_before_model_json['name'] = 'my-instance-network-attachment' instance_cluster_network_attachment_before_model_json['resource_type'] = 'instance_cluster_network_attachment' # Construct a model instance of InstanceClusterNetworkAttachmentBefore by calling from_dict on the json representation - instance_cluster_network_attachment_before_model = InstanceClusterNetworkAttachmentBefore.from_dict( - instance_cluster_network_attachment_before_model_json - ) + instance_cluster_network_attachment_before_model = InstanceClusterNetworkAttachmentBefore.from_dict(instance_cluster_network_attachment_before_model_json) assert instance_cluster_network_attachment_before_model != False # Construct a model instance of InstanceClusterNetworkAttachmentBefore by calling from_dict on the json representation - instance_cluster_network_attachment_before_model_dict = InstanceClusterNetworkAttachmentBefore.from_dict( - instance_cluster_network_attachment_before_model_json - ).__dict__ - instance_cluster_network_attachment_before_model2 = InstanceClusterNetworkAttachmentBefore( - **instance_cluster_network_attachment_before_model_dict - ) + instance_cluster_network_attachment_before_model_dict = InstanceClusterNetworkAttachmentBefore.from_dict(instance_cluster_network_attachment_before_model_json).__dict__ + instance_cluster_network_attachment_before_model2 = InstanceClusterNetworkAttachmentBefore(**instance_cluster_network_attachment_before_model_dict) # Verify the model instances are equivalent assert instance_cluster_network_attachment_before_model == instance_cluster_network_attachment_before_model2 # Convert model instance back to dict and verify no loss of data - instance_cluster_network_attachment_before_model_json2 = ( - instance_cluster_network_attachment_before_model.to_dict() - ) - assert ( - instance_cluster_network_attachment_before_model_json2 - == instance_cluster_network_attachment_before_model_json - ) + instance_cluster_network_attachment_before_model_json2 = instance_cluster_network_attachment_before_model.to_dict() + assert instance_cluster_network_attachment_before_model_json2 == instance_cluster_network_attachment_before_model_json class TestModel_InstanceClusterNetworkAttachmentCollection: @@ -64405,9 +63225,7 @@ def test_instance_cluster_network_attachment_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. instance_cluster_network_attachment_before_model = {} # InstanceClusterNetworkAttachmentBefore - instance_cluster_network_attachment_before_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-a69563fa-0415-4d6e-aeb3-a3f14654bf90' - ) + instance_cluster_network_attachment_before_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-a69563fa-0415-4d6e-aeb3-a3f14654bf90' instance_cluster_network_attachment_before_model['id'] = '0717-a69563fa-0415-4d6e-aeb3-a3f14654bf90' instance_cluster_network_attachment_before_model['name'] = 'other-instance-cluster-network-attachment' instance_cluster_network_attachment_before_model['resource_type'] = 'instance_cluster_network_attachment' @@ -64418,105 +63236,67 @@ def test_instance_cluster_network_attachment_collection_serialization(self): cluster_network_subnet_reserved_ip_reference_model = {} # ClusterNetworkSubnetReservedIPReference cluster_network_subnet_reserved_ip_reference_model['address'] = '10.1.0.6' cluster_network_subnet_reserved_ip_reference_model['deleted'] = deleted_model - cluster_network_subnet_reserved_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/63341ffa-1037-4b50-be40-676e3e9ac0c7' - ) + cluster_network_subnet_reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/63341ffa-1037-4b50-be40-676e3e9ac0c7' cluster_network_subnet_reserved_ip_reference_model['id'] = '63341ffa-1037-4b50-be40-676e3e9ac0c7' cluster_network_subnet_reserved_ip_reference_model['name'] = 'my-cluster-network-subnet-reserved-ip' cluster_network_subnet_reserved_ip_reference_model['resource_type'] = 'cluster_network_subnet_reserved_ip' cluster_network_subnet_reference_model = {} # ClusterNetworkSubnetReference cluster_network_subnet_reference_model['deleted'] = deleted_model - cluster_network_subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - ) + cluster_network_subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' cluster_network_subnet_reference_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' cluster_network_subnet_reference_model['name'] = 'my-cluster-network-subnet' cluster_network_subnet_reference_model['resource_type'] = 'cluster_network_subnet' cluster_network_interface_reference_model = {} # ClusterNetworkInterfaceReference cluster_network_interface_reference_model['deleted'] = deleted_model - cluster_network_interface_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb' - ) + cluster_network_interface_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb' cluster_network_interface_reference_model['id'] = '0717-ffc092f7-5d02-4b93-ab69-26860529b9fb' cluster_network_interface_reference_model['name'] = 'my-cluster-network-interface' cluster_network_interface_reference_model['primary_ip'] = cluster_network_subnet_reserved_ip_reference_model cluster_network_interface_reference_model['resource_type'] = 'cluster_network_interface' cluster_network_interface_reference_model['subnet'] = cluster_network_subnet_reference_model - instance_cluster_network_attachment_lifecycle_reason_model = ( - {} - ) # InstanceClusterNetworkAttachmentLifecycleReason + instance_cluster_network_attachment_lifecycle_reason_model = {} # InstanceClusterNetworkAttachmentLifecycleReason instance_cluster_network_attachment_lifecycle_reason_model['code'] = 'resource_suspended_by_provider' - instance_cluster_network_attachment_lifecycle_reason_model['message'] = ( - 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - ) - instance_cluster_network_attachment_lifecycle_reason_model['more_info'] = ( - 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' - ) + instance_cluster_network_attachment_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + instance_cluster_network_attachment_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' instance_cluster_network_attachment_model = {} # InstanceClusterNetworkAttachment instance_cluster_network_attachment_model['before'] = instance_cluster_network_attachment_before_model - instance_cluster_network_attachment_model['cluster_network_interface'] = ( - cluster_network_interface_reference_model - ) - instance_cluster_network_attachment_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213' - ) + instance_cluster_network_attachment_model['cluster_network_interface'] = cluster_network_interface_reference_model + instance_cluster_network_attachment_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213' instance_cluster_network_attachment_model['id'] = '0717-fb880975-db45-4459-8548-64e3995ac213' - instance_cluster_network_attachment_model['lifecycle_reasons'] = [ - instance_cluster_network_attachment_lifecycle_reason_model - ] + instance_cluster_network_attachment_model['lifecycle_reasons'] = [instance_cluster_network_attachment_lifecycle_reason_model] instance_cluster_network_attachment_model['lifecycle_state'] = 'stable' instance_cluster_network_attachment_model['name'] = 'my-instance-cluster-network-attachment' instance_cluster_network_attachment_model['resource_type'] = 'instance_cluster_network_attachment' page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments?limit=20' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments?limit=20' # Construct a json representation of a InstanceClusterNetworkAttachmentCollection model instance_cluster_network_attachment_collection_model_json = {} - instance_cluster_network_attachment_collection_model_json['cluster_network_attachments'] = [ - instance_cluster_network_attachment_model - ] + instance_cluster_network_attachment_collection_model_json['cluster_network_attachments'] = [instance_cluster_network_attachment_model] instance_cluster_network_attachment_collection_model_json['first'] = page_link_model instance_cluster_network_attachment_collection_model_json['limit'] = 20 instance_cluster_network_attachment_collection_model_json['next'] = page_link_model instance_cluster_network_attachment_collection_model_json['total_count'] = 132 # Construct a model instance of InstanceClusterNetworkAttachmentCollection by calling from_dict on the json representation - instance_cluster_network_attachment_collection_model = InstanceClusterNetworkAttachmentCollection.from_dict( - instance_cluster_network_attachment_collection_model_json - ) + instance_cluster_network_attachment_collection_model = InstanceClusterNetworkAttachmentCollection.from_dict(instance_cluster_network_attachment_collection_model_json) assert instance_cluster_network_attachment_collection_model != False # Construct a model instance of InstanceClusterNetworkAttachmentCollection by calling from_dict on the json representation - instance_cluster_network_attachment_collection_model_dict = ( - InstanceClusterNetworkAttachmentCollection.from_dict( - instance_cluster_network_attachment_collection_model_json - ).__dict__ - ) - instance_cluster_network_attachment_collection_model2 = InstanceClusterNetworkAttachmentCollection( - **instance_cluster_network_attachment_collection_model_dict - ) + instance_cluster_network_attachment_collection_model_dict = InstanceClusterNetworkAttachmentCollection.from_dict(instance_cluster_network_attachment_collection_model_json).__dict__ + instance_cluster_network_attachment_collection_model2 = InstanceClusterNetworkAttachmentCollection(**instance_cluster_network_attachment_collection_model_dict) # Verify the model instances are equivalent - assert ( - instance_cluster_network_attachment_collection_model - == instance_cluster_network_attachment_collection_model2 - ) + assert instance_cluster_network_attachment_collection_model == instance_cluster_network_attachment_collection_model2 # Convert model instance back to dict and verify no loss of data - instance_cluster_network_attachment_collection_model_json2 = ( - instance_cluster_network_attachment_collection_model.to_dict() - ) - assert ( - instance_cluster_network_attachment_collection_model_json2 - == instance_cluster_network_attachment_collection_model_json - ) + instance_cluster_network_attachment_collection_model_json2 = instance_cluster_network_attachment_collection_model.to_dict() + assert instance_cluster_network_attachment_collection_model_json2 == instance_cluster_network_attachment_collection_model_json class TestModel_InstanceClusterNetworkAttachmentLifecycleReason: @@ -64532,45 +63312,23 @@ def test_instance_cluster_network_attachment_lifecycle_reason_serialization(self # Construct a json representation of a InstanceClusterNetworkAttachmentLifecycleReason model instance_cluster_network_attachment_lifecycle_reason_model_json = {} instance_cluster_network_attachment_lifecycle_reason_model_json['code'] = 'resource_suspended_by_provider' - instance_cluster_network_attachment_lifecycle_reason_model_json['message'] = ( - 'The resource has been suspended. Contact IBM support with the CRN for next steps.' - ) - instance_cluster_network_attachment_lifecycle_reason_model_json['more_info'] = ( - 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' - ) + instance_cluster_network_attachment_lifecycle_reason_model_json['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + instance_cluster_network_attachment_lifecycle_reason_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' # Construct a model instance of InstanceClusterNetworkAttachmentLifecycleReason by calling from_dict on the json representation - instance_cluster_network_attachment_lifecycle_reason_model = ( - InstanceClusterNetworkAttachmentLifecycleReason.from_dict( - instance_cluster_network_attachment_lifecycle_reason_model_json - ) - ) + instance_cluster_network_attachment_lifecycle_reason_model = InstanceClusterNetworkAttachmentLifecycleReason.from_dict(instance_cluster_network_attachment_lifecycle_reason_model_json) assert instance_cluster_network_attachment_lifecycle_reason_model != False # Construct a model instance of InstanceClusterNetworkAttachmentLifecycleReason by calling from_dict on the json representation - instance_cluster_network_attachment_lifecycle_reason_model_dict = ( - InstanceClusterNetworkAttachmentLifecycleReason.from_dict( - instance_cluster_network_attachment_lifecycle_reason_model_json - ).__dict__ - ) - instance_cluster_network_attachment_lifecycle_reason_model2 = InstanceClusterNetworkAttachmentLifecycleReason( - **instance_cluster_network_attachment_lifecycle_reason_model_dict - ) + instance_cluster_network_attachment_lifecycle_reason_model_dict = InstanceClusterNetworkAttachmentLifecycleReason.from_dict(instance_cluster_network_attachment_lifecycle_reason_model_json).__dict__ + instance_cluster_network_attachment_lifecycle_reason_model2 = InstanceClusterNetworkAttachmentLifecycleReason(**instance_cluster_network_attachment_lifecycle_reason_model_dict) # Verify the model instances are equivalent - assert ( - instance_cluster_network_attachment_lifecycle_reason_model - == instance_cluster_network_attachment_lifecycle_reason_model2 - ) + assert instance_cluster_network_attachment_lifecycle_reason_model == instance_cluster_network_attachment_lifecycle_reason_model2 # Convert model instance back to dict and verify no loss of data - instance_cluster_network_attachment_lifecycle_reason_model_json2 = ( - instance_cluster_network_attachment_lifecycle_reason_model.to_dict() - ) - assert ( - instance_cluster_network_attachment_lifecycle_reason_model_json2 - == instance_cluster_network_attachment_lifecycle_reason_model_json - ) + instance_cluster_network_attachment_lifecycle_reason_model_json2 = instance_cluster_network_attachment_lifecycle_reason_model.to_dict() + assert instance_cluster_network_attachment_lifecycle_reason_model_json2 == instance_cluster_network_attachment_lifecycle_reason_model_json class TestModel_InstanceClusterNetworkAttachmentPatch: @@ -64588,30 +63346,19 @@ def test_instance_cluster_network_attachment_patch_serialization(self): instance_cluster_network_attachment_patch_model_json['name'] = 'my-instance-network-attachment-updated' # Construct a model instance of InstanceClusterNetworkAttachmentPatch by calling from_dict on the json representation - instance_cluster_network_attachment_patch_model = InstanceClusterNetworkAttachmentPatch.from_dict( - instance_cluster_network_attachment_patch_model_json - ) + instance_cluster_network_attachment_patch_model = InstanceClusterNetworkAttachmentPatch.from_dict(instance_cluster_network_attachment_patch_model_json) assert instance_cluster_network_attachment_patch_model != False # Construct a model instance of InstanceClusterNetworkAttachmentPatch by calling from_dict on the json representation - instance_cluster_network_attachment_patch_model_dict = InstanceClusterNetworkAttachmentPatch.from_dict( - instance_cluster_network_attachment_patch_model_json - ).__dict__ - instance_cluster_network_attachment_patch_model2 = InstanceClusterNetworkAttachmentPatch( - **instance_cluster_network_attachment_patch_model_dict - ) + instance_cluster_network_attachment_patch_model_dict = InstanceClusterNetworkAttachmentPatch.from_dict(instance_cluster_network_attachment_patch_model_json).__dict__ + instance_cluster_network_attachment_patch_model2 = InstanceClusterNetworkAttachmentPatch(**instance_cluster_network_attachment_patch_model_dict) # Verify the model instances are equivalent assert instance_cluster_network_attachment_patch_model == instance_cluster_network_attachment_patch_model2 # Convert model instance back to dict and verify no loss of data - instance_cluster_network_attachment_patch_model_json2 = ( - instance_cluster_network_attachment_patch_model.to_dict() - ) - assert ( - instance_cluster_network_attachment_patch_model_json2 - == instance_cluster_network_attachment_patch_model_json - ) + instance_cluster_network_attachment_patch_model_json2 = instance_cluster_network_attachment_patch_model.to_dict() + assert instance_cluster_network_attachment_patch_model_json2 == instance_cluster_network_attachment_patch_model_json class TestModel_InstanceClusterNetworkAttachmentPrototypeInstanceContext: @@ -64626,9 +63373,7 @@ def test_instance_cluster_network_attachment_prototype_instance_context_serializ # Construct dict forms of any model objects needed in order to build this model. - cluster_network_interface_primary_ip_prototype_model = ( - {} - ) # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext + cluster_network_interface_primary_ip_prototype_model = {} # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext cluster_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' cluster_network_interface_primary_ip_prototype_model['auto_delete'] = False cluster_network_interface_primary_ip_prototype_model['name'] = 'my-cluster-network-subnet-reserved-ip' @@ -64636,63 +63381,31 @@ def test_instance_cluster_network_attachment_prototype_instance_context_serializ cluster_network_subnet_identity_model = {} # ClusterNetworkSubnetIdentityById cluster_network_subnet_identity_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - instance_cluster_network_attachment_prototype_cluster_network_interface_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment + instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = ( - 'my-cluster-network-interface' - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = ( - cluster_network_interface_primary_ip_prototype_model - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = ( - cluster_network_subnet_identity_model - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = cluster_network_subnet_identity_model # Construct a json representation of a InstanceClusterNetworkAttachmentPrototypeInstanceContext model instance_cluster_network_attachment_prototype_instance_context_model_json = {} - instance_cluster_network_attachment_prototype_instance_context_model_json['cluster_network_interface'] = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_model - ) - instance_cluster_network_attachment_prototype_instance_context_model_json['name'] = ( - 'my-instance-network-attachment' - ) + instance_cluster_network_attachment_prototype_instance_context_model_json['cluster_network_interface'] = instance_cluster_network_attachment_prototype_cluster_network_interface_model + instance_cluster_network_attachment_prototype_instance_context_model_json['name'] = 'my-instance-network-attachment' # Construct a model instance of InstanceClusterNetworkAttachmentPrototypeInstanceContext by calling from_dict on the json representation - instance_cluster_network_attachment_prototype_instance_context_model = ( - InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict( - instance_cluster_network_attachment_prototype_instance_context_model_json - ) - ) + instance_cluster_network_attachment_prototype_instance_context_model = InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(instance_cluster_network_attachment_prototype_instance_context_model_json) assert instance_cluster_network_attachment_prototype_instance_context_model != False # Construct a model instance of InstanceClusterNetworkAttachmentPrototypeInstanceContext by calling from_dict on the json representation - instance_cluster_network_attachment_prototype_instance_context_model_dict = ( - InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict( - instance_cluster_network_attachment_prototype_instance_context_model_json - ).__dict__ - ) - instance_cluster_network_attachment_prototype_instance_context_model2 = ( - InstanceClusterNetworkAttachmentPrototypeInstanceContext( - **instance_cluster_network_attachment_prototype_instance_context_model_dict - ) - ) + instance_cluster_network_attachment_prototype_instance_context_model_dict = InstanceClusterNetworkAttachmentPrototypeInstanceContext.from_dict(instance_cluster_network_attachment_prototype_instance_context_model_json).__dict__ + instance_cluster_network_attachment_prototype_instance_context_model2 = InstanceClusterNetworkAttachmentPrototypeInstanceContext(**instance_cluster_network_attachment_prototype_instance_context_model_dict) # Verify the model instances are equivalent - assert ( - instance_cluster_network_attachment_prototype_instance_context_model - == instance_cluster_network_attachment_prototype_instance_context_model2 - ) + assert instance_cluster_network_attachment_prototype_instance_context_model == instance_cluster_network_attachment_prototype_instance_context_model2 # Convert model instance back to dict and verify no loss of data - instance_cluster_network_attachment_prototype_instance_context_model_json2 = ( - instance_cluster_network_attachment_prototype_instance_context_model.to_dict() - ) - assert ( - instance_cluster_network_attachment_prototype_instance_context_model_json2 - == instance_cluster_network_attachment_prototype_instance_context_model_json - ) + instance_cluster_network_attachment_prototype_instance_context_model_json2 = instance_cluster_network_attachment_prototype_instance_context_model.to_dict() + assert instance_cluster_network_attachment_prototype_instance_context_model_json2 == instance_cluster_network_attachment_prototype_instance_context_model_json class TestModel_InstanceClusterNetworkAttachmentReference: @@ -64707,42 +63420,25 @@ def test_instance_cluster_network_attachment_reference_serialization(self): # Construct a json representation of a InstanceClusterNetworkAttachmentReference model instance_cluster_network_attachment_reference_model_json = {} - instance_cluster_network_attachment_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213' - ) + instance_cluster_network_attachment_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213' instance_cluster_network_attachment_reference_model_json['id'] = '0717-fb880975-db45-4459-8548-64e3995ac213' instance_cluster_network_attachment_reference_model_json['name'] = 'my-instance-network-attachment' - instance_cluster_network_attachment_reference_model_json['resource_type'] = ( - 'instance_cluster_network_attachment' - ) + instance_cluster_network_attachment_reference_model_json['resource_type'] = 'instance_cluster_network_attachment' # Construct a model instance of InstanceClusterNetworkAttachmentReference by calling from_dict on the json representation - instance_cluster_network_attachment_reference_model = InstanceClusterNetworkAttachmentReference.from_dict( - instance_cluster_network_attachment_reference_model_json - ) + instance_cluster_network_attachment_reference_model = InstanceClusterNetworkAttachmentReference.from_dict(instance_cluster_network_attachment_reference_model_json) assert instance_cluster_network_attachment_reference_model != False # Construct a model instance of InstanceClusterNetworkAttachmentReference by calling from_dict on the json representation - instance_cluster_network_attachment_reference_model_dict = InstanceClusterNetworkAttachmentReference.from_dict( - instance_cluster_network_attachment_reference_model_json - ).__dict__ - instance_cluster_network_attachment_reference_model2 = InstanceClusterNetworkAttachmentReference( - **instance_cluster_network_attachment_reference_model_dict - ) + instance_cluster_network_attachment_reference_model_dict = InstanceClusterNetworkAttachmentReference.from_dict(instance_cluster_network_attachment_reference_model_json).__dict__ + instance_cluster_network_attachment_reference_model2 = InstanceClusterNetworkAttachmentReference(**instance_cluster_network_attachment_reference_model_dict) # Verify the model instances are equivalent - assert ( - instance_cluster_network_attachment_reference_model == instance_cluster_network_attachment_reference_model2 - ) + assert instance_cluster_network_attachment_reference_model == instance_cluster_network_attachment_reference_model2 # Convert model instance back to dict and verify no loss of data - instance_cluster_network_attachment_reference_model_json2 = ( - instance_cluster_network_attachment_reference_model.to_dict() - ) - assert ( - instance_cluster_network_attachment_reference_model_json2 - == instance_cluster_network_attachment_reference_model_json - ) + instance_cluster_network_attachment_reference_model_json2 = instance_cluster_network_attachment_reference_model.to_dict() + assert instance_cluster_network_attachment_reference_model_json2 == instance_cluster_network_attachment_reference_model_json class TestModel_InstanceCollection: @@ -64770,13 +63466,9 @@ def test_instance_collection_serialization(self): volume_attachment_device_model['id'] = '0717-80b3e36e-41f4-40e9-bd56-beae81792a68-679qb' 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['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'] = 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['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' @@ -64784,65 +63476,47 @@ def test_instance_collection_serialization(self): volume_attachment_reference_instance_context_model = {} # VolumeAttachmentReferenceInstanceContext volume_attachment_reference_instance_context_model['deleted'] = 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' - ) + volume_attachment_reference_instance_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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_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['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'] = 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' - ) + 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['plan'] = catalog_offering_version_plan_reference_model instance_catalog_offering_model['version'] = catalog_offering_version_reference_model cluster_network_reference_model = {} # ClusterNetworkReference - cluster_network_reference_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573' - ) + cluster_network_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::cluster-network:0717-da0df18c-7598-4633-a648-fdaac28a5573' cluster_network_reference_model['deleted'] = deleted_model - cluster_network_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573' - ) + cluster_network_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573' cluster_network_reference_model['id'] = '0717-da0df18c-7598-4633-a648-fdaac28a5573' cluster_network_reference_model['name'] = 'my-cluster-network' cluster_network_reference_model['resource_type'] = 'cluster_network' instance_cluster_network_attachment_reference_model = {} # InstanceClusterNetworkAttachmentReference - instance_cluster_network_attachment_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213' - ) + instance_cluster_network_attachment_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213' instance_cluster_network_attachment_reference_model['id'] = '0717-fb880975-db45-4459-8548-64e3995ac213' instance_cluster_network_attachment_reference_model['name'] = 'my-instance-network-attachment' instance_cluster_network_attachment_reference_model['resource_type'] = 'instance_cluster_network_attachment' 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['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a' dedicated_host_reference_model['deleted'] = 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['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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' - ) + instance_disk_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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' @@ -64858,9 +63532,7 @@ 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-server-health-status-reasons' - ) + instance_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-server-health-status-reasons' account_reference_model = {} # AccountReference account_reference_model['id'] = 'bb1b52262f7441a586f49068482f1e60' @@ -64875,13 +63547,9 @@ 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'] = deleted_model - image_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/images/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 @@ -64889,9 +63557,7 @@ def test_instance_collection_serialization(self): 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['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 @@ -64902,57 +63568,39 @@ def test_instance_collection_serialization(self): reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.0.1.5' reserved_ip_reference_model['deleted'] = deleted_model - reserved_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - ) + reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/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['name'] = 'my-reserved-ip-z1' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' 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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) - virtual_network_interface_reference_attachment_context_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) + 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + virtual_network_interface_reference_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' virtual_network_interface_reference_attachment_context_model['id'] = '0717-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_reference_model = {} # InstanceNetworkAttachmentReference instance_network_attachment_reference_model['deleted'] = deleted_model - instance_network_attachment_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - ) + instance_network_attachment_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-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 - instance_network_attachment_reference_model['virtual_network_interface'] = ( - virtual_network_interface_reference_attachment_context_model - ) + instance_network_attachment_reference_model['virtual_network_interface'] = virtual_network_interface_reference_attachment_context_model network_interface_instance_context_reference_model = {} # NetworkInterfaceInstanceContextReference network_interface_instance_context_reference_model['deleted'] = deleted_model - network_interface_instance_context_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - ) + network_interface_instance_context_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' network_interface_instance_context_reference_model['id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' network_interface_instance_context_reference_model['name'] = 'my-instance-network-interface' network_interface_instance_context_reference_model['primary_ip'] = reserved_ip_reference_model @@ -64960,13 +63608,9 @@ def test_instance_collection_serialization(self): network_interface_instance_context_reference_model['subnet'] = subnet_reference_model 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['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host:0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_placement_target_model['deleted'] = 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['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' @@ -64977,13 +63621,9 @@ def test_instance_collection_serialization(self): instance_profile_reference_model['resource_type'] = 'instance_profile' reservation_reference_model = {} # ReservationReference - reservation_reference_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63' - ) + reservation_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63' reservation_reference_model['deleted'] = deleted_model - reservation_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63' - ) + reservation_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63' reservation_reference_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' reservation_reference_model['name'] = 'my-reservation' reservation_reference_model['resource_type'] = 'reservation' @@ -64993,20 +63633,14 @@ def test_instance_collection_serialization(self): 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['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' @@ -65014,13 +63648,9 @@ def test_instance_collection_serialization(self): instance_vcpu_model['manufacturer'] = 'intel' 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'] = 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' @@ -65038,18 +63668,14 @@ def test_instance_collection_serialization(self): instance_model['cluster_network_attachments'] = [instance_cluster_network_attachment_reference_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://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + instance_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' instance_model['id'] = '0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' instance_model['image'] = image_reference_model instance_model['lifecycle_reasons'] = [instance_lifecycle_reason_model] @@ -65114,27 +63740,19 @@ 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'] = ( - 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50IjoiYWEyNDMyYjFmYTRkNGFjZTg5MWU5YjgwZmMxMDRlMzQiLCJzZWNyZXQiOiJRVzRnWlhoaGJYQnNaU0J6WldOeVpYUUsiLCJleHAiOjE3MjYwNzU1OTR9.UFDVzzGJ54Go9Z4jgyPSLG49zNx-AjHTQrJA6ee8KLI' - ) + instance_console_access_token_model_json['access_token'] = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50IjoiYWEyNDMyYjFmYTRkNGFjZTg5MWU5YjgwZmMxMDRlMzQiLCJzZWNyZXQiOiJRVzRnWlhoaGJYQnNaU0J6WldOeVpYUUsiLCJleHAiOjE3MjYwNzU1OTR9.UFDVzzGJ54Go9Z4jgyPSLG49zNx-AjHTQrJA6ee8KLI' 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['force'] = False - instance_console_access_token_model_json['href'] = ( - 'wss://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/console?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50IjoiYWEyNDMyYjFmYTRkNGFjZTg5MWU5YjgwZmMxMDRlMzQiLCJzZWNyZXQiOiJRVzRnWlhoaGJYQnNaU0J6WldOeVpYUUsiLCJleHAiOjE3MjYwNzU1OTR9.UFDVzzGJ54Go9Z4jgyPSLG49zNx-AjHTQrJA6ee8KLI' - ) + instance_console_access_token_model_json['href'] = 'wss://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/console?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50IjoiYWEyNDMyYjFmYTRkNGFjZTg5MWU5YjgwZmMxMDRlMzQiLCJzZWNyZXQiOiJRVzRnWlhoaGJYQnNaU0J6WldOeVpYUUsiLCJleHAiOjE3MjYwNzU1OTR9.UFDVzzGJ54Go9Z4jgyPSLG49zNx-AjHTQrJA6ee8KLI' # 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_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 @@ -65166,30 +63784,19 @@ def test_instance_default_trusted_profile_prototype_serialization(self): 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() - ) - assert ( - instance_default_trusted_profile_prototype_model_json2 - == instance_default_trusted_profile_prototype_model_json - ) + 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 class TestModel_InstanceDisk: @@ -65205,9 +63812,7 @@ 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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' - ) + instance_disk_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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' @@ -65244,9 +63849,7 @@ 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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' - ) + instance_disk_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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' @@ -65262,9 +63865,7 @@ def test_instance_disk_collection_serialization(self): 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_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 @@ -65323,9 +63924,7 @@ def test_instance_disk_reference_serialization(self): # Construct a json representation of a InstanceDiskReference model instance_disk_reference_model_json = {} instance_disk_reference_model_json['deleted'] = deleted_model - instance_disk_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/disks/10c02d81-0ecb-4dc5-897d-28392913b81e' - ) + instance_disk_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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' @@ -65335,9 +63934,7 @@ def test_instance_disk_reference_serialization(self): 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_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 @@ -65397,59 +63994,47 @@ def test_instance_group_serialization(self): 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['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' instance_template_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' + instance_template_reference_model['id'] = '0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' 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['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_model = {} # LoadBalancerPoolReference load_balancer_pool_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_reference_model['id'] = 'r006-70294e14-4e61-11e8-bcf4-0242ac110004' load_balancer_pool_reference_model['name'] = 'my-load-balancer-pool' instance_group_manager_reference_model = {} # InstanceGroupManagerReference instance_group_manager_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea' + instance_group_manager_reference_model['id'] = 'r006-bd21f31f-8a05-4451-836d-ab0347e91fea' 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/fee82deba12e4c0fb69c3b09d1f12345' + resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'Default' subnet_reference_model = {} # SubnetReference - subnet_reference_model['crn'] = 'crn:[...]' + 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'] = 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://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_model = {} # VPCReference - vpc_reference_model['crn'] = 'crn:[...]' + vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_model['deleted'] = deleted_model - 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['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' @@ -65457,13 +64042,9 @@ 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['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60' + instance_group_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60' + instance_group_model_json['id'] = 'r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60' 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' @@ -65506,97 +64087,73 @@ def test_instance_group_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. page_link_model = {} # PageLink - page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups?limit=20' + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups?limit=50' deleted_model = {} # Deleted 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['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' instance_template_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' + instance_template_reference_model['id'] = '0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' 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['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_model = {} # LoadBalancerPoolReference load_balancer_pool_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_reference_model['id'] = 'r006-70294e14-4e61-11e8-bcf4-0242ac110004' load_balancer_pool_reference_model['name'] = 'my-load-balancer-pool' instance_group_manager_reference_model = {} # InstanceGroupManagerReference instance_group_manager_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea' + instance_group_manager_reference_model['id'] = 'r006-bd21f31f-8a05-4451-836d-ab0347e91fea' 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['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['name'] = 'Default' 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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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_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'] = 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' 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['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a' + instance_group_model['created_at'] = '2024-11-15T19:55:00Z' + instance_group_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60' + instance_group_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60' + instance_group_model['id'] = 'r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60' 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['membership_count'] = 10 + instance_group_model['membership_count'] = 0 instance_group_model['name'] = 'my-instance-group' instance_group_model['resource_group'] = resource_group_reference_model - instance_group_model['status'] = 'deleting' + instance_group_model['status'] = 'healthy' instance_group_model['subnets'] = [subnet_reference_model] - instance_group_model['updated_at'] = '2019-01-01T12:00:00Z' + instance_group_model['updated_at'] = '2024-11-18T21:25:02Z' instance_group_model['vpc'] = vpc_reference_model # Construct a json representation of a InstanceGroupCollection model @@ -65612,9 +64169,7 @@ def test_instance_group_collection_serialization(self): 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_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 @@ -65638,26 +64193,16 @@ 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['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 @@ -65682,30 +64227,19 @@ def test_instance_group_manager_action_group_patch_serialization(self): 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() - ) - assert ( - instance_group_manager_action_group_patch_model_json2 - == instance_group_manager_action_group_patch_model_json - ) + 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 class TestModel_InstanceGroupManagerActionManagerPatch: @@ -65724,30 +64258,19 @@ def test_instance_group_manager_action_manager_patch_serialization(self): 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() - ) - assert ( - instance_group_manager_action_manager_patch_model_json2 - == instance_group_manager_action_manager_patch_model_json - ) + 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 class TestModel_InstanceGroupManagerActionPatch: @@ -65780,18 +64303,12 @@ def test_instance_group_manager_action_patch_serialization(self): 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 @@ -65819,26 +64336,18 @@ def test_instance_group_manager_action_reference_serialization(self): # Construct a json representation of a InstanceGroupManagerActionReference model instance_group_manager_action_reference_model_json = {} instance_group_manager_action_reference_model_json['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7' + instance_group_manager_action_reference_model_json['id'] = 'r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7' 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 @@ -65866,25 +64375,21 @@ def test_instance_group_manager_actions_collection_serialization(self): 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['created_at'] = '2024-11-18T18:42:00Z' + instance_group_manager_action_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7' + instance_group_manager_action_model['id'] = 'r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7' 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'] = '2024-11-18T18:42: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['cron_spec'] = '15 * * * *' 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 page_link_model = {} # PageLink - page_link_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' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions?limit=50' # Construct a json representation of a InstanceGroupManagerActionsCollection model instance_group_manager_actions_collection_model_json = {} @@ -65895,30 +64400,19 @@ def test_instance_group_manager_actions_collection_serialization(self): 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() - ) - assert ( - instance_group_manager_actions_collection_model_json2 - == instance_group_manager_actions_collection_model_json - ) + 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 class TestModel_InstanceGroupManagerCollection: @@ -65934,35 +64428,29 @@ def test_instance_group_manager_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers?limit=20' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers?limit=50' deleted_model = {} # Deleted 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'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7' + instance_group_manager_policy_reference_model['id'] = 'r006-ca664290-30eb-4ad7-9fb6-db45731f0be7' 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['created_at'] = '2024-11-18T19:54:00Z' + instance_group_manager_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea' + instance_group_manager_model['id'] = 'r006-bd21f31f-8a05-4451-836d-ab0347e91fea' 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' - instance_group_manager_model['aggregation_window'] = 120 - instance_group_manager_model['cooldown'] = 210 + instance_group_manager_model['updated_at'] = '2024-11-18T19:54:00Z' + instance_group_manager_model['aggregation_window'] = 90 + instance_group_manager_model['cooldown'] = 300 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['max_membership_count'] = 50 + instance_group_manager_model['min_membership_count'] = 1 instance_group_manager_model['policies'] = [instance_group_manager_policy_reference_model] # Construct a json representation of a InstanceGroupManagerCollection model @@ -65974,18 +64462,12 @@ def test_instance_group_manager_collection_serialization(self): 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 @@ -66015,15 +64497,11 @@ def test_instance_group_manager_patch_serialization(self): 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_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 @@ -66047,20 +64525,16 @@ def test_instance_group_manager_policy_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. page_link_model = {} # PageLink - page_link_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' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies?limit=50' 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['created_at'] = '2024-11-18T19:56:00Z' + instance_group_manager_policy_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7' + instance_group_manager_policy_model['id'] = 'r006-ca664290-30eb-4ad7-9fb6-db45731f0be7' 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['updated_at'] = '2024-11-18T19:56:00Z' instance_group_manager_policy_model['metric_type'] = 'cpu' - instance_group_manager_policy_model['metric_value'] = 38 + instance_group_manager_policy_model['metric_value'] = 50 instance_group_manager_policy_model['policy_type'] = 'target' # Construct a json representation of a InstanceGroupManagerPolicyCollection model @@ -66072,27 +64546,19 @@ def test_instance_group_manager_policy_collection_serialization(self): 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() - assert ( - instance_group_manager_policy_collection_model_json2 == instance_group_manager_policy_collection_model_json - ) + assert instance_group_manager_policy_collection_model_json2 == instance_group_manager_policy_collection_model_json class TestModel_InstanceGroupManagerPolicyPatch: @@ -66112,18 +64578,12 @@ def test_instance_group_manager_policy_patch_serialization(self): 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 @@ -66151,25 +64611,17 @@ def test_instance_group_manager_policy_reference_serialization(self): # Construct a json representation of a InstanceGroupManagerPolicyReference model instance_group_manager_policy_reference_model_json = {} instance_group_manager_policy_reference_model_json['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7' + instance_group_manager_policy_reference_model_json['id'] = 'r006-ca664290-30eb-4ad7-9fb6-db45731f0be7' 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 @@ -66197,25 +64649,17 @@ def test_instance_group_manager_reference_serialization(self): # Construct a json representation of a InstanceGroupManagerReference model instance_group_manager_reference_model_json = {} instance_group_manager_reference_model_json['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea' + instance_group_manager_reference_model_json['id'] = 'r006-bd21f31f-8a05-4451-836d-ab0347e91fea' 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 @@ -66240,32 +64684,19 @@ def test_instance_group_manager_scheduled_action_group_serialization(self): 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 - ) + 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() - ) - assert ( - instance_group_manager_scheduled_action_group_model_json2 - == instance_group_manager_scheduled_action_group_model_json - ) + 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 class TestModel_InstanceGroupManagerScheduledActionGroupPrototype: @@ -66283,39 +64714,19 @@ def test_instance_group_manager_scheduled_action_group_prototype_serialization(s 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 - ) + 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() - ) - assert ( - instance_group_manager_scheduled_action_group_prototype_model_json2 - == instance_group_manager_scheduled_action_group_prototype_model_json - ) + 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 class TestModel_InstanceGroupMembership: @@ -66334,42 +64745,30 @@ def test_instance_group_membership_serialization(self): 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + instance_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_ccd0c9fd-1966-40e8-a8d7-ef2fbe3bcfad' instance_reference_model['deleted'] = deleted_model - instance_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) - instance_reference_model['id'] = '0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - instance_reference_model['name'] = 'my-instance' + instance_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_ccd0c9fd-1966-40e8-a8d7-ef2fbe3bcfad' + instance_reference_model['id'] = '0717_ccd0c9fd-1966-40e8-a8d7-ef2fbe3bcfad' + instance_reference_model['name'] = 'issuing-reverb-oblivion-seventh-perch-discove-tq6ek486jb-kz8o8' 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['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' instance_template_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' + instance_template_reference_model['id'] = '0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' instance_template_reference_model['name'] = 'my-instance-template' load_balancer_pool_member_reference_model = {} # LoadBalancerPoolMemberReference load_balancer_pool_member_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a' + load_balancer_pool_member_reference_model['id'] = 'r006-4a4b345f-cf6b-4326-8202-6d8229e9833a' # 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/r006-32c8210b-fd1a-409f-8966-de85bbfd3741' + instance_group_membership_model_json['id'] = 'r006-32c8210b-fd1a-409f-8966-de85bbfd3741' 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' @@ -66382,9 +64781,7 @@ def test_instance_group_membership_serialization(self): 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_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 @@ -66408,55 +64805,41 @@ def test_instance_group_membership_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/7241e2a8-601f-11ea-8503-000c29475bed/memberships?limit=20' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships?limit=50' deleted_model = {} # Deleted 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + instance_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_ccd0c9fd-1966-40e8-a8d7-ef2fbe3bcfad' instance_reference_model['deleted'] = deleted_model - instance_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) - instance_reference_model['id'] = '0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - instance_reference_model['name'] = 'my-instance' + instance_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_ccd0c9fd-1966-40e8-a8d7-ef2fbe3bcfad' + instance_reference_model['id'] = '0717_ccd0c9fd-1966-40e8-a8d7-ef2fbe3bcfad' + instance_reference_model['name'] = 'issuing-reverb-oblivion-seventh-perch-discove-tq6ek486jb-kz8o8' 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['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' instance_template_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' + instance_template_reference_model['id'] = '0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' instance_template_reference_model['name'] = 'my-instance-template' load_balancer_pool_member_reference_model = {} # LoadBalancerPoolMemberReference load_balancer_pool_member_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a' + load_balancer_pool_member_reference_model['id'] = 'r006-4a4b345f-cf6b-4326-8202-6d8229e9833a' instance_group_membership_model = {} # InstanceGroupMembership - instance_group_membership_model['created_at'] = '2019-01-01T12:00:00Z' + instance_group_membership_model['created_at'] = '2024-11-18T18:54:32Z' 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/r006-32c8210b-fd1a-409f-8966-de85bbfd3741' + instance_group_membership_model['id'] = 'r006-32c8210b-fd1a-409f-8966-de85bbfd3741' instance_group_membership_model['instance'] = instance_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['status'] = 'deleting' - instance_group_membership_model['updated_at'] = '2019-01-01T12:00:00Z' + instance_group_membership_model['status'] = 'healthy' + instance_group_membership_model['updated_at'] = '2024-11-18T18:54:32Z' # Construct a json representation of a InstanceGroupMembershipCollection model instance_group_membership_collection_model_json = {} @@ -66467,18 +64850,12 @@ def test_instance_group_membership_collection_serialization(self): 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 @@ -66504,18 +64881,12 @@ def test_instance_group_membership_patch_serialization(self): 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 @@ -66538,13 +64909,13 @@ 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'] = '0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' load_balancer_identity_model = {} # LoadBalancerIdentityById - load_balancer_identity_model['id'] = 'dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + load_balancer_identity_model['id'] = 'r006-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['id'] = 'r006-70294e14-4e61-11e8-bcf4-0242ac110004' subnet_identity_model = {} # SubnetIdentityById subnet_identity_model['id'] = '0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e' @@ -66592,14 +64963,10 @@ def test_instance_group_reference_serialization(self): # 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60' instance_group_reference_model_json['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60' + instance_group_reference_model_json['id'] = 'r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60' instance_group_reference_model_json['name'] = 'my-instance-group' # Construct a model instance of InstanceGroupReference by calling from_dict on the json representation @@ -66607,9 +64974,7 @@ def test_instance_group_reference_serialization(self): 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_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 @@ -66634,9 +64999,7 @@ def test_instance_health_reason_serialization(self): 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-server-health-status-reasons' - ) + instance_health_reason_model_json['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-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) @@ -66667,9 +65030,7 @@ def test_instance_initialization_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['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' @@ -66681,14 +65042,10 @@ def test_instance_initialization_serialization(self): 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:r006-82679077-ac3b-4c10-be16-63e9c21f0f45' - ) + key_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45' key_reference_model['deleted'] = deleted_model key_reference_model['fingerprint'] = 'SHA256:RJ+YWs2kupwFGiJuLqY85twmcdLOUcjIc9cA6IR8n8E' - key_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45' - ) + key_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45' key_reference_model['id'] = 'r006-82679077-ac3b-4c10-be16-63e9c21f0f45' key_reference_model['name'] = 'my-key-1' @@ -66696,16 +65053,12 @@ def test_instance_initialization_serialization(self): 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['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 @@ -66714,9 +65067,7 @@ def test_instance_initialization_serialization(self): 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_model_dict = InstanceInitialization.from_dict(instance_initialization_model_json).__dict__ instance_initialization_model2 = InstanceInitialization(**instance_initialization_model_dict) # Verify the model instances are equivalent @@ -66740,9 +65091,7 @@ 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['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' @@ -66752,35 +65101,19 @@ def test_instance_initialization_default_trusted_profile_serialization(self): 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 - ) + 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() - ) - assert ( - instance_initialization_default_trusted_profile_model_json2 - == instance_initialization_default_trusted_profile_model_json - ) + 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 class TestModel_InstanceInitializationPassword: @@ -66800,24 +65133,16 @@ def test_instance_initialization_password_serialization(self): # 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['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 @@ -66840,9 +65165,7 @@ 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['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 @@ -66850,9 +65173,7 @@ def test_instance_lifecycle_reason_serialization(self): 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_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 @@ -66884,9 +65205,7 @@ def test_instance_metadata_service_serialization(self): 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_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 @@ -66914,18 +65233,12 @@ 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 @@ -66952,18 +65265,12 @@ 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 @@ -66991,34 +65298,22 @@ def test_instance_network_attachment_serialization(self): reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.0.1.5' reserved_ip_reference_model['deleted'] = deleted_model - reserved_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - ) + reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/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['name'] = 'my-reserved-ip-z1' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' 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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) - virtual_network_interface_reference_attachment_context_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) + 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + virtual_network_interface_reference_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' virtual_network_interface_reference_attachment_context_model['id'] = '0717-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' @@ -67026,9 +65321,7 @@ def test_instance_network_attachment_serialization(self): # 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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - ) + instance_network_attachment_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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' @@ -67037,18 +65330,14 @@ def test_instance_network_attachment_serialization(self): 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) 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_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 @@ -67077,43 +65366,29 @@ def test_instance_network_attachment_collection_serialization(self): reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.0.1.5' reserved_ip_reference_model['deleted'] = deleted_model - reserved_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - ) + reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/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['name'] = 'my-reserved-ip-z1' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' 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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) - virtual_network_interface_reference_attachment_context_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) + 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + virtual_network_interface_reference_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' virtual_network_interface_reference_attachment_context_model['id'] = '0717-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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - ) + instance_network_attachment_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' instance_network_attachment_model['id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' instance_network_attachment_model['lifecycle_state'] = 'stable' instance_network_attachment_model['name'] = 'my-instance-network-attachment' @@ -67122,27 +65397,19 @@ def test_instance_network_attachment_collection_serialization(self): 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] # 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 @@ -67167,18 +65434,12 @@ def test_instance_network_attachment_patch_serialization(self): 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 @@ -67200,16 +65461,12 @@ 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 = {} # 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' @@ -67223,48 +65480,30 @@ def test_instance_network_attachment_prototype_serialization(self): 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 = {} # 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['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['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['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['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 @@ -67292,34 +65531,22 @@ def test_instance_network_attachment_reference_serialization(self): reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.0.1.5' reserved_ip_reference_model['deleted'] = deleted_model - reserved_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - ) + reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/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['name'] = 'my-reserved-ip-z1' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' 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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) - virtual_network_interface_reference_attachment_context_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) + 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + virtual_network_interface_reference_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' virtual_network_interface_reference_attachment_context_model['id'] = '0717-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' @@ -67327,31 +65554,21 @@ def test_instance_network_attachment_reference_serialization(self): # Construct a json representation of a InstanceNetworkAttachmentReference model instance_network_attachment_reference_model_json = {} instance_network_attachment_reference_model_json['deleted'] = deleted_model - instance_network_attachment_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_attachments/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - ) + instance_network_attachment_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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['virtual_network_interface'] = ( - virtual_network_interface_reference_attachment_context_model - ) + instance_network_attachment_reference_model_json['virtual_network_interface'] = virtual_network_interface_reference_attachment_context_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 @@ -67381,9 +65598,7 @@ def test_instance_patch_serialization(self): 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 = {} # InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById instance_placement_target_patch_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_patch_profile_model = {} # InstancePatchProfileInstanceProfileIdentityByName @@ -67393,7 +65608,7 @@ def test_instance_patch_serialization(self): reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' instance_reservation_affinity_patch_model = {} # InstanceReservationAffinityPatch - instance_reservation_affinity_patch_model['policy'] = 'disabled' + instance_reservation_affinity_patch_model['policy'] = 'automatic' instance_reservation_affinity_patch_model['pool'] = [reservation_identity_model] # Construct a json representation of a InstancePatch model @@ -67440,14 +65655,10 @@ def test_instance_profile_serialization(self): instance_profile_bandwidth_model['type'] = 'fixed' instance_profile_bandwidth_model['value'] = 20000 - instance_profile_cluster_network_attachment_count_model = ( - {} - ) # InstanceProfileClusterNetworkAttachmentCountDependent + instance_profile_cluster_network_attachment_count_model = {} # InstanceProfileClusterNetworkAttachmentCountDependent instance_profile_cluster_network_attachment_count_model['type'] = 'dependent' - instance_profile_supported_confidential_compute_modes_model = ( - {} - ) # InstanceProfileSupportedConfidentialComputeModes + 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'] @@ -67523,9 +65734,7 @@ def test_instance_profile_serialization(self): instance_profile_supported_secure_boot_modes_model['values'] = [True] cluster_network_profile_reference_model = {} # ClusterNetworkProfileReference - cluster_network_profile_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100' - ) + cluster_network_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100' cluster_network_profile_reference_model['name'] = 'h100' cluster_network_profile_reference_model['resource_type'] = 'cluster_network_profile' @@ -67550,12 +65759,8 @@ def test_instance_profile_serialization(self): # 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['cluster_network_attachment_count'] = ( - instance_profile_cluster_network_attachment_count_model - ) - instance_profile_model_json['confidential_compute_modes'] = ( - instance_profile_supported_confidential_compute_modes_model - ) + instance_profile_model_json['cluster_network_attachment_count'] = instance_profile_cluster_network_attachment_count_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 @@ -67612,14 +65817,10 @@ def test_instance_profile_collection_serialization(self): instance_profile_bandwidth_model['type'] = 'fixed' instance_profile_bandwidth_model['value'] = 20000 - instance_profile_cluster_network_attachment_count_model = ( - {} - ) # InstanceProfileClusterNetworkAttachmentCountDependent + instance_profile_cluster_network_attachment_count_model = {} # InstanceProfileClusterNetworkAttachmentCountDependent instance_profile_cluster_network_attachment_count_model['type'] = 'dependent' - instance_profile_supported_confidential_compute_modes_model = ( - {} - ) # InstanceProfileSupportedConfidentialComputeModes + 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'] @@ -67695,9 +65896,7 @@ def test_instance_profile_collection_serialization(self): instance_profile_supported_secure_boot_modes_model['values'] = [True] cluster_network_profile_reference_model = {} # ClusterNetworkProfileReference - cluster_network_profile_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100' - ) + cluster_network_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100' cluster_network_profile_reference_model['name'] = 'h100' cluster_network_profile_reference_model['resource_type'] = 'cluster_network_profile' @@ -67721,12 +65920,8 @@ def test_instance_profile_collection_serialization(self): instance_profile_model = {} # InstanceProfile instance_profile_model['bandwidth'] = instance_profile_bandwidth_model - instance_profile_model['cluster_network_attachment_count'] = ( - instance_profile_cluster_network_attachment_count_model - ) - instance_profile_model['confidential_compute_modes'] = ( - instance_profile_supported_confidential_compute_modes_model - ) + instance_profile_model['cluster_network_attachment_count'] = instance_profile_cluster_network_attachment_count_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 @@ -67760,9 +65955,7 @@ def test_instance_profile_collection_serialization(self): 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_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 @@ -67837,30 +66030,19 @@ def test_instance_profile_disk_supported_interfaces_serialization(self): 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() - ) - assert ( - instance_profile_disk_supported_interfaces_model_json2 - == instance_profile_disk_supported_interfaces_model_json - ) + 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 class TestModel_InstanceProfileGPUManufacturer: @@ -67879,18 +66061,12 @@ 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 @@ -67920,9 +66096,7 @@ def test_instance_profile_gpu_model_serialization(self): 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_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 @@ -67950,18 +66124,12 @@ 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 @@ -67983,9 +66151,7 @@ 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' @@ -67994,9 +66160,7 @@ def test_instance_profile_reference_serialization(self): 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_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 @@ -68023,18 +66187,12 @@ def test_instance_profile_reservation_terms_serialization(self): 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 @@ -68061,37 +66219,19 @@ def test_instance_profile_supported_confidential_compute_modes_serialization(sel 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 - ) - ) + 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 - ) + 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 - ) + 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 - ) + 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: @@ -68111,30 +66251,19 @@ def test_instance_profile_supported_secure_boot_modes_serialization(self): 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 - ) + 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 - ) + 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 - ) + 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: @@ -68154,18 +66283,12 @@ 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 @@ -68192,18 +66315,12 @@ 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 @@ -68230,13 +66347,9 @@ def test_instance_reference_serialization(self): # 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + instance_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' instance_reference_model_json['deleted'] = deleted_model - instance_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + instance_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' instance_reference_model_json['id'] = '0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' instance_reference_model_json['name'] = 'my-instance' @@ -68272,32 +66385,24 @@ def test_instance_reservation_affinity_serialization(self): 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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63' - ) + reservation_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63' reservation_reference_model['deleted'] = deleted_model - reservation_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63' - ) + reservation_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63' reservation_reference_model['id'] = '0717-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['policy'] = 'automatic' 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_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 @@ -68325,22 +66430,16 @@ def test_instance_reservation_affinity_patch_serialization(self): # 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['policy'] = 'automatic' 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 @@ -68367,22 +66466,16 @@ def test_instance_reservation_affinity_prototype_serialization(self): # 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['policy'] = 'automatic' 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 @@ -68405,12 +66498,8 @@ 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) @@ -68446,9 +66535,7 @@ def test_instance_template_collection_serialization(self): instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - cluster_network_interface_primary_ip_prototype_model = ( - {} - ) # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext + cluster_network_interface_primary_ip_prototype_model = {} # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext cluster_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' cluster_network_interface_primary_ip_prototype_model['auto_delete'] = False cluster_network_interface_primary_ip_prototype_model['name'] = 'my-cluster-network-subnet-reserved-ip' @@ -68456,26 +66543,14 @@ def test_instance_template_collection_serialization(self): cluster_network_subnet_identity_model = {} # ClusterNetworkSubnetIdentityById cluster_network_subnet_identity_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - instance_cluster_network_attachment_prototype_cluster_network_interface_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment + instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = ( - 'my-cluster-network-interface' - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = ( - cluster_network_interface_primary_ip_prototype_model - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = ( - cluster_network_subnet_identity_model - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = cluster_network_subnet_identity_model - instance_cluster_network_attachment_prototype_instance_context_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeInstanceContext - instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_model - ) + instance_cluster_network_attachment_prototype_instance_context_model = {} # InstanceClusterNetworkAttachmentPrototypeInstanceContext + instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = instance_cluster_network_attachment_prototype_cluster_network_interface_model instance_cluster_network_attachment_prototype_instance_context_model['name'] = 'my-instance-network-attachment' trusted_profile_identity_model = {} # TrustedProfileIdentityById @@ -68493,9 +66568,7 @@ def test_instance_template_collection_serialization(self): 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 = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName @@ -68505,13 +66578,11 @@ def test_instance_template_collection_serialization(self): reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype - instance_reservation_affinity_prototype_model['policy'] = 'disabled' + instance_reservation_affinity_prototype_model['policy'] = 'automatic' 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['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' @@ -68527,9 +66598,7 @@ def test_instance_template_collection_serialization(self): 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' @@ -68546,14 +66615,10 @@ def test_instance_template_collection_serialization(self): 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 = {} # 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['volume'] = volume_prototype_instance_by_image_context_model image_identity_model = {} # ImageIdentityById image_identity_model['id'] = 'r006-02c73baf-9abb-493d-9e41-d0f1866f4051' @@ -68561,16 +66626,12 @@ 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 = {} # 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' @@ -68581,52 +66642,32 @@ def test_instance_template_collection_serialization(self): 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 = {} # 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['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['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['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_model['virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_model - instance_template_model = ( - {} - ) # InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment + instance_template_model = {} # InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment instance_template_model['availability_policy'] = instance_availability_policy_prototype_model - instance_template_model['cluster_network_attachments'] = [ - instance_cluster_network_attachment_prototype_instance_context_model - ] + instance_template_model['cluster_network_attachments'] = [instance_cluster_network_attachment_prototype_instance_context_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['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' + instance_template_model['id'] = '0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' instance_template_model['keys'] = [key_identity_model] instance_template_model['metadata_service'] = instance_metadata_service_prototype_model instance_template_model['name'] = 'my-instance-template' @@ -68653,15 +66694,11 @@ def test_instance_template_collection_serialization(self): 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_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 @@ -68691,9 +66728,7 @@ def test_instance_template_patch_serialization(self): 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_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 @@ -68721,14 +66756,10 @@ def test_instance_template_reference_serialization(self): # 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['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-template:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' instance_template_reference_model_json['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' + instance_template_reference_model_json['id'] = '0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' instance_template_reference_model_json['name'] = 'my-instance-template' # Construct a model instance of InstanceTemplateReference by calling from_dict on the json representation @@ -68736,9 +66767,7 @@ def test_instance_template_reference_serialization(self): 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_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 @@ -68794,26 +66823,20 @@ 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://resource-controller.cloud.ibm.com/v2/resource_groups/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 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:r006-82679077-ac3b-4c10-be16-63e9c21f0f45' - ) + key_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45' key_model_json['fingerprint'] = 'SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY' key_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45' key_model_json['id'] = 'r006-82679077-ac3b-4c10-be16-63e9c21f0f45' key_model_json['length'] = 2048 key_model_json['name'] = 'my-key-1' - 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' @@ -68849,25 +66872,19 @@ def test_key_collection_serialization(self): page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys?limit=50' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = ( - 'https://resource-controller.cloud.ibm.com/v2/resource_groups/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' key_model = {} # Key key_model['created_at'] = '2019-01-29T03:48:11Z' - key_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45' - ) + key_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45' key_model['fingerprint'] = 'SHA256:RJ+YWs2kupwFGiJuLqY85twmcdLOUcjIc9cA6IR8n8E' key_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45' key_model['id'] = 'r006-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' @@ -68942,14 +66959,10 @@ def test_key_reference_serialization(self): # 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:r006-82679077-ac3b-4c10-be16-63e9c21f0f45' - ) + key_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45' key_reference_model_json['deleted'] = deleted_model key_reference_model_json['fingerprint'] = 'SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY' - key_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45' - ) + key_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45' key_reference_model_json['id'] = 'r006-82679077-ac3b-4c10-be16-63e9c21f0f45' key_reference_model_json['name'] = 'my-key-1' @@ -68984,30 +66997,19 @@ def test_legacy_cloud_object_storage_bucket_reference_serialization(self): 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() - ) - assert ( - legacy_cloud_object_storage_bucket_reference_model_json2 - == legacy_cloud_object_storage_bucket_reference_model_json - ) + 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 class TestModel_LoadBalancer: @@ -69023,9 +67025,7 @@ def test_load_balancer_serialization(self): # Construct dict forms of any model objects needed in order to build this model. 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_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' @@ -69039,10 +67039,8 @@ def test_load_balancer_serialization(self): load_balancer_listener_reference_model = {} # LoadBalancerListenerReference load_balancer_listener_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' + load_balancer_listener_reference_model['id'] = 'r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' load_balancer_logging_datapath_model = {} # LoadBalancerLoggingDatapath load_balancer_logging_datapath_model['active'] = True @@ -69052,58 +67050,42 @@ def test_load_balancer_serialization(self): load_balancer_pool_reference_model = {} # LoadBalancerPoolReference load_balancer_pool_reference_model['deleted'] = 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_pool_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-2c431ab3-0151-11e9-a178-22dd3503b06c' + load_balancer_pool_reference_model['id'] = 'r006-2c431ab3-0151-11e9-a178-22dd3503b06c' + load_balancer_pool_reference_model['name'] = 'my-load-balancer-pool-1' reserved_ip_reference_model = {} # ReservedIPReference - reserved_ip_reference_model['address'] = '192.168.3.4' + reserved_ip_reference_model['address'] = '10.0.1.5' reserved_ip_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/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['name'] = 'my-reserved-ip-z1-1' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' 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['name'] = 'network-fixed' + load_balancer_profile_reference_model['family'] = 'application' + load_balancer_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/dynamic' + load_balancer_profile_reference_model['name'] = 'dynamic' ip_model = {} # IP - ip_model['address'] = '192.168.3.4' + ip_model['address'] = '192.0.0.56' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = ( - 'https://resource-controller.cloud.ibm.com/v2/resource_groups/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' + resource_group_reference_model['name'] = 'Default' 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_reference_model['deleted'] = 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['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_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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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' @@ -69113,15 +67095,11 @@ def test_load_balancer_serialization(self): load_balancer_model_json['access_mode'] = 'private' load_balancer_model_json['availability'] = 'region' 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:r006-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['id'] = 'dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + load_balancer_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + load_balancer_model_json['id'] = 'r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727' load_balancer_model_json['instance_groups_supported'] = True load_balancer_model_json['is_private_path'] = True load_balancer_model_json['is_public'] = True @@ -69172,12 +67150,10 @@ def test_load_balancer_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. page_link_model = {} # PageLink - page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers?limit=20' + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers?limit=50' 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_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' @@ -69191,10 +67167,8 @@ def test_load_balancer_collection_serialization(self): load_balancer_listener_reference_model = {} # LoadBalancerListenerReference load_balancer_listener_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' + load_balancer_listener_reference_model['id'] = 'r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' load_balancer_logging_datapath_model = {} # LoadBalancerLoggingDatapath load_balancer_logging_datapath_model['active'] = True @@ -69204,82 +67178,62 @@ def test_load_balancer_collection_serialization(self): load_balancer_pool_reference_model = {} # LoadBalancerPoolReference load_balancer_pool_reference_model['deleted'] = 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_pool_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-2c431ab3-0151-11e9-a178-22dd3503b06c' + load_balancer_pool_reference_model['id'] = 'r006-2c431ab3-0151-11e9-a178-22dd3503b06c' + load_balancer_pool_reference_model['name'] = 'my-load-balancer-pool-1' reserved_ip_reference_model = {} # ReservedIPReference - reserved_ip_reference_model['address'] = '192.168.3.4' + reserved_ip_reference_model['address'] = '10.0.1.5' reserved_ip_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/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['name'] = 'my-reserved-ip-z1-1' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' 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['name'] = 'network-fixed' + load_balancer_profile_reference_model['family'] = 'application' + load_balancer_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/dynamic' + load_balancer_profile_reference_model['name'] = 'dynamic' ip_model = {} # IP - ip_model['address'] = '192.168.3.4' + ip_model['address'] = '192.0.0.56' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = ( - 'https://resource-controller.cloud.ibm.com/v2/resource_groups/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' + resource_group_reference_model['name'] = 'Default' 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_reference_model['deleted'] = 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['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_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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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['access_mode'] = 'private' - load_balancer_model['availability'] = 'region' - 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['availability'] = 'subnet' + load_balancer_model['created_at'] = '2024-11-11T01:02:42Z' + load_balancer_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-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['id'] = 'dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + load_balancer_model['hostname'] = '7b6dc78d.lb.appdomain.cloud' + load_balancer_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + load_balancer_model['id'] = 'r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727' load_balancer_model['instance_groups_supported'] = True - load_balancer_model['is_private_path'] = True + load_balancer_model['is_private_path'] = False load_balancer_model['is_public'] = True 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['operating_status'] = 'online' load_balancer_model['pools'] = [load_balancer_pool_reference_model] load_balancer_model['private_ips'] = [reserved_ip_reference_model] load_balancer_model['profile'] = load_balancer_profile_reference_model @@ -69287,10 +67241,10 @@ def test_load_balancer_collection_serialization(self): 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['route_mode'] = False load_balancer_model['security_groups'] = [security_group_reference_model] load_balancer_model['security_groups_supported'] = True - load_balancer_model['source_ip_session_persistence_supported'] = True + load_balancer_model['source_ip_session_persistence_supported'] = False load_balancer_model['subnets'] = [subnet_reference_model] load_balancer_model['udp_supported'] = True @@ -69307,9 +67261,7 @@ def test_load_balancer_collection_serialization(self): 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_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 @@ -69333,9 +67285,7 @@ def test_load_balancer_dns_serialization(self): # Construct dict forms of any model objects needed in order to build this model. 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_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' @@ -69374,9 +67324,7 @@ 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/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::' - ) + 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' @@ -69415,9 +67363,7 @@ 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/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::' - ) + 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' @@ -69432,9 +67378,7 @@ def test_load_balancer_dns_prototype_serialization(self): 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_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 @@ -69458,27 +67402,21 @@ 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['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' deleted_model = {} # Deleted deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' load_balancer_pool_reference_model = {} # LoadBalancerPoolReference load_balancer_pool_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_reference_model['id'] = 'r006-70294e14-4e61-11e8-bcf4-0242ac110004' load_balancer_pool_reference_model['name'] = 'my-load-balancer-pool' load_balancer_listener_reference_model = {} # LoadBalancerListenerReference load_balancer_listener_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' + load_balancer_listener_reference_model['id'] = 'r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' load_balancer_listener_https_redirect_model = {} # LoadBalancerListenerHTTPSRedirect load_balancer_listener_https_redirect_model['http_status_code'] = 301 @@ -69487,11 +67425,9 @@ def test_load_balancer_listener_serialization(self): load_balancer_listener_policy_reference_model = {} # LoadBalancerListenerPolicyReference load_balancer_listener_policy_reference_model['deleted'] = 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_policy_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245' + load_balancer_listener_policy_reference_model['id'] = 'r006-0b00a37f-a3d7-43ca-8187-f1e88d659245' + load_balancer_listener_policy_reference_model['name'] = 'my-load-balancer-listener-policy' # Construct a json representation of a LoadBalancerListener model load_balancer_listener_model_json = {} @@ -69500,11 +67436,9 @@ def test_load_balancer_listener_serialization(self): 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' 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['id'] = 'r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' 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['port'] = 443 @@ -69542,27 +67476,21 @@ 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['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5' deleted_model = {} # Deleted deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' load_balancer_pool_reference_model = {} # LoadBalancerPoolReference load_balancer_pool_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_reference_model['id'] = 'r006-70294e14-4e61-11e8-bcf4-0242ac110004' load_balancer_pool_reference_model['name'] = 'my-load-balancer-pool' load_balancer_listener_reference_model = {} # LoadBalancerListenerReference load_balancer_listener_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' + load_balancer_listener_reference_model['id'] = 'r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' load_balancer_listener_https_redirect_model = {} # LoadBalancerListenerHTTPSRedirect load_balancer_listener_https_redirect_model['http_status_code'] = 301 @@ -69571,28 +67499,24 @@ def test_load_balancer_listener_collection_serialization(self): load_balancer_listener_policy_reference_model = {} # LoadBalancerListenerPolicyReference load_balancer_listener_policy_reference_model['deleted'] = 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_policy_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245' + load_balancer_listener_policy_reference_model['id'] = 'r006-0b00a37f-a3d7-43ca-8187-f1e88d659245' + load_balancer_listener_policy_reference_model['name'] = 'my-load-balancer-listener-policy' load_balancer_listener_model = {} # LoadBalancerListener - load_balancer_listener_model['accept_proxy_protocol'] = True + load_balancer_listener_model['accept_proxy_protocol'] = False 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['created_at'] = '2024-11-11T02:01:21Z' 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' 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['id'] = 'r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' load_balancer_listener_model['idle_connection_timeout'] = 100 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 + load_balancer_listener_model['port'] = 80 + load_balancer_listener_model['port_max'] = 80 + load_balancer_listener_model['port_min'] = 80 load_balancer_listener_model['protocol'] = 'http' load_balancer_listener_model['provisioning_status'] = 'active' @@ -69601,18 +67525,12 @@ def test_load_balancer_listener_collection_serialization(self): 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 @@ -69639,10 +67557,8 @@ def test_load_balancer_listener_https_redirect_serialization(self): load_balancer_listener_reference_model = {} # LoadBalancerListenerReference load_balancer_listener_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' + load_balancer_listener_reference_model['id'] = 'r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' # Construct a json representation of a LoadBalancerListenerHTTPSRedirect model load_balancer_listener_https_redirect_model_json = {} @@ -69651,18 +67567,12 @@ def test_load_balancer_listener_https_redirect_serialization(self): 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 @@ -69685,7 +67595,7 @@ 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['id'] = 'r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' # Construct a json representation of a LoadBalancerListenerHTTPSRedirectPatch model load_balancer_listener_https_redirect_patch_model_json = {} @@ -69694,30 +67604,19 @@ def test_load_balancer_listener_https_redirect_patch_serialization(self): 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() - ) - assert ( - load_balancer_listener_https_redirect_patch_model_json2 - == load_balancer_listener_https_redirect_patch_model_json - ) + 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 class TestModel_LoadBalancerListenerHTTPSRedirectPrototype: @@ -69733,7 +67632,7 @@ def test_load_balancer_listener_https_redirect_prototype_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['id'] = 'r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' # Construct a json representation of a LoadBalancerListenerHTTPSRedirectPrototype model load_balancer_listener_https_redirect_prototype_model_json = {} @@ -69742,35 +67641,19 @@ def test_load_balancer_listener_https_redirect_prototype_serialization(self): 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 - ) + 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() - ) - assert ( - load_balancer_listener_https_redirect_prototype_model_json2 - == load_balancer_listener_https_redirect_prototype_model_json - ) + 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 class TestModel_LoadBalancerListenerPatch: @@ -69786,17 +67669,13 @@ 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' - ) + 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_default_pool_patch_model = {} # LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById + load_balancer_listener_default_pool_patch_model['id'] = 'r006-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_identity_model['id'] = 'r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' load_balancer_listener_https_redirect_patch_model = {} # LoadBalancerListenerHTTPSRedirectPatch load_balancer_listener_https_redirect_patch_model['http_status_code'] = 301 @@ -69817,15 +67696,11 @@ 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_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 @@ -69853,43 +67728,31 @@ def test_load_balancer_listener_policy_serialization(self): load_balancer_listener_policy_rule_reference_model = {} # LoadBalancerListenerPolicyRuleReference load_balancer_listener_policy_rule_reference_model['deleted'] = 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_listener_policy_rule_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b' + load_balancer_listener_policy_rule_reference_model['id'] = 'r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b' - load_balancer_listener_policy_target_model = {} # LoadBalancerListenerPolicyTargetLoadBalancerPoolReference - load_balancer_listener_policy_target_model['deleted'] = 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_target_model = {} # LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL + load_balancer_listener_policy_target_model['http_status_code'] = 301 + load_balancer_listener_policy_target_model['url'] = 'https://www.example.com' # 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['name'] = 'my-policy' + load_balancer_listener_policy_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245' + load_balancer_listener_policy_model_json['id'] = 'r006-0b00a37f-a3d7-43ca-8187-f1e88d659245' + load_balancer_listener_policy_model_json['name'] = 'my-load-balancer-listener-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 # 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_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 @@ -69917,28 +67780,20 @@ def test_load_balancer_listener_policy_collection_serialization(self): load_balancer_listener_policy_rule_reference_model = {} # LoadBalancerListenerPolicyRuleReference load_balancer_listener_policy_rule_reference_model['deleted'] = 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_listener_policy_rule_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b' + load_balancer_listener_policy_rule_reference_model['id'] = 'r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b' - load_balancer_listener_policy_target_model = {} # LoadBalancerListenerPolicyTargetLoadBalancerPoolReference - load_balancer_listener_policy_target_model['deleted'] = 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_target_model = {} # LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL + load_balancer_listener_policy_target_model['http_status_code'] = 301 + load_balancer_listener_policy_target_model['url'] = 'https://www.example.com' 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['name'] = 'my-policy' - load_balancer_listener_policy_model['priority'] = 5 + load_balancer_listener_policy_model['action'] = 'redirect' + load_balancer_listener_policy_model['created_at'] = '2024-11-12T00:12:27Z' + load_balancer_listener_policy_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245' + load_balancer_listener_policy_model['id'] = 'r006-0b00a37f-a3d7-43ca-8187-f1e88d659245' + load_balancer_listener_policy_model['name'] = 'my-load-balancer-listener-policy' + load_balancer_listener_policy_model['priority'] = 9 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 @@ -69948,27 +67803,19 @@ def test_load_balancer_listener_policy_collection_serialization(self): 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() - assert ( - load_balancer_listener_policy_collection_model_json2 == load_balancer_listener_policy_collection_model_json - ) + assert load_balancer_listener_policy_collection_model_json2 == load_balancer_listener_policy_collection_model_json class TestModel_LoadBalancerListenerPolicyPatch: @@ -69983,30 +67830,22 @@ 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'] = 'r006-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['name'] = 'my-load-balancer-listener-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 # 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 @@ -70034,36 +67873,24 @@ def test_load_balancer_listener_policy_prototype_serialization(self): load_balancer_listener_policy_rule_prototype_model['type'] = 'body' 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'] = 'r006-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['name'] = 'my-load-balancer-listener-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 @@ -70091,25 +67918,17 @@ def test_load_balancer_listener_policy_reference_serialization(self): # Construct a json representation of a LoadBalancerListenerPolicyReference model load_balancer_listener_policy_reference_model_json = {} load_balancer_listener_policy_reference_model_json['deleted'] = 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' + load_balancer_listener_policy_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245' + load_balancer_listener_policy_reference_model_json['id'] = 'r006-0b00a37f-a3d7-43ca-8187-f1e88d659245' + load_balancer_listener_policy_reference_model_json['name'] = 'my-load-balancer-listener-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 @@ -70134,27 +67953,19 @@ def test_load_balancer_listener_policy_rule_serialization(self): 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['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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b' + load_balancer_listener_policy_rule_model_json['id'] = 'r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b' 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 @@ -70178,47 +67989,32 @@ def test_load_balancer_listener_policy_rule_collection_serialization(self): 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'] = '2024-11-12T01:28:42Z' 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b' + load_balancer_listener_policy_rule_model['id'] = 'r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b' 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' + load_balancer_listener_policy_rule_model['type'] = 'hostname' + load_balancer_listener_policy_rule_model['value'] = 'my-example-hostname' # 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] # 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 - ) + 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() - ) - assert ( - load_balancer_listener_policy_rule_collection_model_json2 - == load_balancer_listener_policy_rule_collection_model_json - ) + 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 class TestModel_LoadBalancerListenerPolicyRulePatch: @@ -70239,27 +68035,19 @@ def test_load_balancer_listener_policy_rule_patch_serialization(self): 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() - assert ( - load_balancer_listener_policy_rule_patch_model_json2 == load_balancer_listener_policy_rule_patch_model_json - ) + assert load_balancer_listener_policy_rule_patch_model_json2 == load_balancer_listener_policy_rule_patch_model_json class TestModel_LoadBalancerListenerPolicyRulePrototype: @@ -70280,30 +68068,19 @@ def test_load_balancer_listener_policy_rule_prototype_serialization(self): 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() - ) - assert ( - load_balancer_listener_policy_rule_prototype_model_json2 - == load_balancer_listener_policy_rule_prototype_model_json - ) + 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 class TestModel_LoadBalancerListenerPolicyRuleReference: @@ -70324,36 +68101,23 @@ def test_load_balancer_listener_policy_rule_reference_serialization(self): # 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'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091/policies/r006-0b00a37f-a3d7-43ca-8187-f1e88d659245/rules/r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b' + load_balancer_listener_policy_rule_reference_model_json['id'] = 'r006-d2da2832-9751-4e29-ad1d-4b19c1c83c7b' # 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() - ) - assert ( - load_balancer_listener_policy_rule_reference_model_json2 - == load_balancer_listener_policy_rule_reference_model_json - ) + 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 class TestModel_LoadBalancerListenerPrototypeLoadBalancerContext: @@ -70369,15 +68133,13 @@ def test_load_balancer_listener_prototype_load_balancer_context_serialization(se # 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['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_identity_model['id'] = 'r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' load_balancer_listener_https_redirect_prototype_model = {} # LoadBalancerListenerHTTPSRedirectPrototype load_balancer_listener_https_redirect_prototype_model['http_status_code'] = 301 @@ -70387,16 +68149,10 @@ def test_load_balancer_listener_prototype_load_balancer_context_serialization(se # 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['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['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 @@ -70404,39 +68160,19 @@ def test_load_balancer_listener_prototype_load_balancer_context_serialization(se 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 - ) + 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() - ) - assert ( - load_balancer_listener_prototype_load_balancer_context_model_json2 - == load_balancer_listener_prototype_load_balancer_context_model_json - ) + 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 class TestModel_LoadBalancerListenerReference: @@ -70457,24 +68193,16 @@ def test_load_balancer_listener_reference_serialization(self): # Construct a json representation of a LoadBalancerListenerReference model load_balancer_listener_reference_model_json = {} load_balancer_listener_reference_model_json['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' + load_balancer_listener_reference_model_json['id'] = 'r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' # 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 @@ -70534,15 +68262,11 @@ 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_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 @@ -70568,18 +68292,12 @@ 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 @@ -70604,27 +68322,19 @@ 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() - assert ( - load_balancer_logging_datapath_prototype_model_json2 == load_balancer_logging_datapath_prototype_model_json - ) + assert load_balancer_logging_datapath_prototype_model_json2 == load_balancer_logging_datapath_prototype_model_json class TestModel_LoadBalancerLoggingPatch: @@ -70651,9 +68361,7 @@ def test_load_balancer_logging_patch_serialization(self): 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_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 @@ -70684,18 +68392,12 @@ def test_load_balancer_logging_prototype_serialization(self): 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 @@ -70718,9 +68420,7 @@ 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/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::' - ) + 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' @@ -70785,36 +68485,28 @@ def test_load_balancer_pool_serialization(self): 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60' instance_group_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60' + instance_group_reference_model['id'] = 'r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60' instance_group_reference_model['name'] = 'my-instance-group' load_balancer_pool_member_reference_model = {} # LoadBalancerPoolMemberReference load_balancer_pool_member_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a' + load_balancer_pool_member_reference_model['id'] = 'r006-4a4b345f-cf6b-4326-8202-6d8229e9833a' 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_session_persistence_model['type'] = 'source_ip' # 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_model_json['id'] = 'r006-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' @@ -70863,41 +68555,33 @@ def test_load_balancer_pool_collection_serialization(self): 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::instance-group:r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60' instance_group_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60' + instance_group_reference_model['id'] = 'r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60' instance_group_reference_model['name'] = 'my-instance-group' load_balancer_pool_member_reference_model = {} # LoadBalancerPoolMemberReference load_balancer_pool_member_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a' + load_balancer_pool_member_reference_model['id'] = 'r006-4a4b345f-cf6b-4326-8202-6d8229e9833a' 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_session_persistence_model['type'] = 'source_ip' 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['algorithm'] = 'round_robin' + load_balancer_pool_model['created_at'] = '2024-11-11T02:04:42Z' 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_model['id'] = 'r006-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['name'] = 'my-load-balancer-pool' - load_balancer_pool_model['protocol'] = 'http' + load_balancer_pool_model['protocol'] = 'tcp' load_balancer_pool_model['provisioning_status'] = 'active' - load_balancer_pool_model['proxy_protocol'] = 'disabled' + load_balancer_pool_model['proxy_protocol'] = 'v1' load_balancer_pool_model['session_persistence'] = load_balancer_pool_session_persistence_model # Construct a json representation of a LoadBalancerPoolCollection model @@ -70905,15 +68589,11 @@ def test_load_balancer_pool_collection_serialization(self): 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_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 @@ -70944,18 +68624,12 @@ 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 @@ -70985,18 +68659,12 @@ 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 @@ -71026,30 +68694,19 @@ def test_load_balancer_pool_health_monitor_prototype_serialization(self): 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() - ) - assert ( - load_balancer_pool_health_monitor_prototype_model_json2 - == load_balancer_pool_health_monitor_prototype_model_json - ) + 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 class TestModel_LoadBalancerPoolIdentityByName: @@ -71067,18 +68724,12 @@ def test_load_balancer_pool_identity_by_name_serialization(self): 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 @@ -71104,13 +68755,9 @@ def test_load_balancer_pool_member_serialization(self): 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + load_balancer_pool_member_target_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' load_balancer_pool_member_target_model['deleted'] = deleted_model - load_balancer_pool_member_target_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + load_balancer_pool_member_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' load_balancer_pool_member_target_model['id'] = '0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' load_balancer_pool_member_target_model['name'] = 'my-instance' @@ -71118,10 +68765,8 @@ def test_load_balancer_pool_member_serialization(self): 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['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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a' + load_balancer_pool_member_model_json['id'] = 'r006-4a4b345f-cf6b-4326-8202-6d8229e9833a' 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 @@ -71132,9 +68777,7 @@ def test_load_balancer_pool_member_serialization(self): 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_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 @@ -71161,23 +68804,17 @@ def test_load_balancer_pool_member_collection_serialization(self): 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + load_balancer_pool_member_target_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' load_balancer_pool_member_target_model['deleted'] = deleted_model - load_balancer_pool_member_target_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + load_balancer_pool_member_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' load_balancer_pool_member_target_model['id'] = '0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' 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['created_at'] = '2024-11-11T02:37:45Z' + load_balancer_pool_member_model['health'] = 'ok' + load_balancer_pool_member_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a' + load_balancer_pool_member_model['id'] = 'r006-4a4b345f-cf6b-4326-8202-6d8229e9833a' 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 @@ -71188,18 +68825,12 @@ def test_load_balancer_pool_member_collection_serialization(self): 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 @@ -71221,9 +68852,7 @@ 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 = {} # LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById load_balancer_pool_member_target_prototype_model['id'] = '0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' # Construct a json representation of a LoadBalancerPoolMemberPatch model @@ -71233,18 +68862,12 @@ def test_load_balancer_pool_member_patch_serialization(self): 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 @@ -71266,9 +68889,7 @@ 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 = {} # LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById load_balancer_pool_member_target_prototype_model['id'] = '0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' # Construct a json representation of a LoadBalancerPoolMemberPrototype model @@ -71278,18 +68899,12 @@ def test_load_balancer_pool_member_prototype_serialization(self): 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 @@ -71317,24 +68932,16 @@ def test_load_balancer_pool_member_reference_serialization(self): # Construct a json representation of a LoadBalancerPoolMemberReference model load_balancer_pool_member_reference_model_json = {} load_balancer_pool_member_reference_model_json['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004/members/r006-4a4b345f-cf6b-4326-8202-6d8229e9833a' + load_balancer_pool_member_reference_model_json['id'] = 'r006-4a4b345f-cf6b-4326-8202-6d8229e9833a' # 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 @@ -71382,9 +68989,7 @@ def test_load_balancer_pool_patch_serialization(self): 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_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 @@ -71415,9 +69020,7 @@ 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 = {} # LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById load_balancer_pool_member_target_prototype_model['id'] = '0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' load_balancer_pool_member_prototype_model = {} # LoadBalancerPoolMemberPrototype @@ -71437,20 +69040,14 @@ def test_load_balancer_pool_prototype_serialization(self): 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_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 @@ -71479,22 +69076,16 @@ def test_load_balancer_pool_reference_serialization(self): # Construct a json representation of a LoadBalancerPoolReference model load_balancer_pool_reference_model_json = {} load_balancer_pool_reference_model_json['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_pool_reference_model_json['id'] = 'r006-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_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 @@ -71521,18 +69112,12 @@ def test_load_balancer_pool_session_persistence_serialization(self): 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 @@ -71558,30 +69143,19 @@ def test_load_balancer_pool_session_persistence_patch_serialization(self): 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() - ) - assert ( - load_balancer_pool_session_persistence_patch_model_json2 - == load_balancer_pool_session_persistence_patch_model_json - ) + 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 class TestModel_LoadBalancerPoolSessionPersistencePrototype: @@ -71600,35 +69174,19 @@ def test_load_balancer_pool_session_persistence_prototype_serialization(self): 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 - ) + 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() - ) - assert ( - load_balancer_pool_session_persistence_prototype_model_json2 - == load_balancer_pool_session_persistence_prototype_model_json - ) + 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 class TestModel_LoadBalancerProfile: @@ -71645,11 +69203,11 @@ def test_load_balancer_profile_serialization(self): load_balancer_profile_access_modes_model = {} # LoadBalancerProfileAccessModes load_balancer_profile_access_modes_model['type'] = 'enum' - load_balancer_profile_access_modes_model['values'] = ['private'] + load_balancer_profile_access_modes_model['values'] = ['public', 'private', 'public', 'private'] load_balancer_profile_availability_model = {} # LoadBalancerProfileAvailabilityFixed load_balancer_profile_availability_model['type'] = 'fixed' - load_balancer_profile_availability_model['value'] = 'region' + load_balancer_profile_availability_model['value'] = 'subnet' load_balancer_profile_instance_groups_supported_model = {} # LoadBalancerProfileInstanceGroupsSupportedFixed load_balancer_profile_instance_groups_supported_model['type'] = 'fixed' @@ -71657,7 +69215,7 @@ def test_load_balancer_profile_serialization(self): 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_logging_supported_model['value'] = ['datapath', 'datapath'] load_balancer_profile_route_mode_supported_model = {} # LoadBalancerProfileRouteModeSupportedFixed load_balancer_profile_route_mode_supported_model['type'] = 'fixed' @@ -71667,9 +69225,7 @@ def test_load_balancer_profile_serialization(self): load_balancer_profile_security_groups_supported_model['type'] = 'fixed' load_balancer_profile_security_groups_supported_model['value'] = True - load_balancer_profile_source_ip_session_persistence_supported_model = ( - {} - ) # LoadBalancerProfileSourceIPSessionPersistenceSupportedFixed + load_balancer_profile_source_ip_session_persistence_supported_model = {} # LoadBalancerProfileSourceIPSessionPersistenceSupportedFixed load_balancer_profile_source_ip_session_persistence_supported_model['type'] = 'fixed' load_balancer_profile_source_ip_session_persistence_supported_model['value'] = True @@ -71681,22 +69237,14 @@ def test_load_balancer_profile_serialization(self): load_balancer_profile_model_json = {} load_balancer_profile_model_json['access_modes'] = load_balancer_profile_access_modes_model load_balancer_profile_model_json['availability'] = load_balancer_profile_availability_model - 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['family'] = 'application' + 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['source_ip_session_persistence_supported'] = ( - load_balancer_profile_source_ip_session_persistence_supported_model - ) + load_balancer_profile_model_json['security_groups_supported'] = load_balancer_profile_security_groups_supported_model + load_balancer_profile_model_json['source_ip_session_persistence_supported'] = load_balancer_profile_source_ip_session_persistence_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 @@ -71731,18 +69279,12 @@ def test_load_balancer_profile_access_modes_serialization(self): load_balancer_profile_access_modes_model_json['values'] = ['private'] # Construct a model instance of LoadBalancerProfileAccessModes by calling from_dict on the json representation - load_balancer_profile_access_modes_model = LoadBalancerProfileAccessModes.from_dict( - load_balancer_profile_access_modes_model_json - ) + load_balancer_profile_access_modes_model = LoadBalancerProfileAccessModes.from_dict(load_balancer_profile_access_modes_model_json) assert load_balancer_profile_access_modes_model != False # Construct a model instance of LoadBalancerProfileAccessModes by calling from_dict on the json representation - load_balancer_profile_access_modes_model_dict = LoadBalancerProfileAccessModes.from_dict( - load_balancer_profile_access_modes_model_json - ).__dict__ - load_balancer_profile_access_modes_model2 = LoadBalancerProfileAccessModes( - **load_balancer_profile_access_modes_model_dict - ) + load_balancer_profile_access_modes_model_dict = LoadBalancerProfileAccessModes.from_dict(load_balancer_profile_access_modes_model_json).__dict__ + load_balancer_profile_access_modes_model2 = LoadBalancerProfileAccessModes(**load_balancer_profile_access_modes_model_dict) # Verify the model instances are equivalent assert load_balancer_profile_access_modes_model == load_balancer_profile_access_modes_model2 @@ -71791,9 +69333,7 @@ def test_load_balancer_profile_collection_serialization(self): load_balancer_profile_security_groups_supported_model['type'] = 'fixed' load_balancer_profile_security_groups_supported_model['value'] = True - load_balancer_profile_source_ip_session_persistence_supported_model = ( - {} - ) # LoadBalancerProfileSourceIPSessionPersistenceSupportedFixed + load_balancer_profile_source_ip_session_persistence_supported_model = {} # LoadBalancerProfileSourceIPSessionPersistenceSupportedFixed load_balancer_profile_source_ip_session_persistence_supported_model['type'] = 'fixed' load_balancer_profile_source_ip_session_persistence_supported_model['value'] = True @@ -71804,18 +69344,14 @@ def test_load_balancer_profile_collection_serialization(self): load_balancer_profile_model = {} # LoadBalancerProfile load_balancer_profile_model['access_modes'] = load_balancer_profile_access_modes_model load_balancer_profile_model['availability'] = load_balancer_profile_availability_model - 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['family'] = 'application' + 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['source_ip_session_persistence_supported'] = ( - load_balancer_profile_source_ip_session_persistence_supported_model - ) + load_balancer_profile_model['source_ip_session_persistence_supported'] = load_balancer_profile_source_ip_session_persistence_supported_model load_balancer_profile_model['udp_supported'] = load_balancer_profile_udp_supported_model # Construct a json representation of a LoadBalancerProfileCollection model @@ -71827,18 +69363,12 @@ def test_load_balancer_profile_collection_serialization(self): 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 @@ -71864,18 +69394,12 @@ def test_load_balancer_profile_logging_supported_serialization(self): 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 @@ -71897,25 +69421,17 @@ 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['family'] = 'application' + 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 @@ -71942,14 +69458,10 @@ def test_load_balancer_reference_serialization(self): # Construct a json representation of a LoadBalancerReference model load_balancer_reference_model_json = {} - load_balancer_reference_model_json['crn'] = ( - 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727' - ) + load_balancer_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727' load_balancer_reference_model_json['deleted'] = deleted_model - load_balancer_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' - ) - load_balancer_reference_model_json['id'] = 'dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + load_balancer_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + load_balancer_reference_model_json['id'] = 'r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727' load_balancer_reference_model_json['name'] = 'my-load-balancer' load_balancer_reference_model_json['resource_type'] = 'load_balancer' @@ -71958,9 +69470,7 @@ def test_load_balancer_reference_serialization(self): assert load_balancer_reference_model != False # Construct a model instance of LoadBalancerReference by calling from_dict on the json representation - load_balancer_reference_model_dict = LoadBalancerReference.from_dict( - load_balancer_reference_model_json - ).__dict__ + load_balancer_reference_model_dict = LoadBalancerReference.from_dict(load_balancer_reference_model_json).__dict__ load_balancer_reference_model2 = LoadBalancerReference(**load_balancer_reference_model_dict) # Verify the model instances are equivalent @@ -71993,9 +69503,7 @@ def test_load_balancer_statistics_serialization(self): 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_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 @@ -72019,36 +69527,30 @@ 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['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['name'] = 'Default' deleted_model = {} # Deleted deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' network_acl_rule_reference_model = {} # NetworkACLRuleReference network_acl_rule_reference_model['deleted'] = 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_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model['id'] = 'r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model['name'] = 'my-allow-inbound-rule' 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['created_at'] = '2024-12-11T06:26:17Z' + network_acl_rule_item_model['destination'] = '0.0.0.0/0' 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/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_item_model['id'] = 'r006-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' + network_acl_rule_item_model['name'] = 'my-allow-inbound-rule' + network_acl_rule_item_model['source'] = '0.0.0.0/0' network_acl_rule_item_model['destination_port_max'] = 22 network_acl_rule_item_model['destination_port_min'] = 22 network_acl_rule_item_model['protocol'] = 'udp' @@ -72056,25 +69558,17 @@ def test_network_acl_serialization(self): network_acl_rule_item_model['source_port_min'] = 49152 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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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_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'] = 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' @@ -72082,12 +69576,8 @@ 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['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 @@ -72124,39 +69614,33 @@ def test_network_acl_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. page_link_model = {} # PageLink - page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls?limit=20' + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls?limit=50' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = ( - 'https://resource-controller.cloud.ibm.com/v2/resource_groups/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' + resource_group_reference_model['name'] = 'Default' deleted_model = {} # Deleted deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' network_acl_rule_reference_model = {} # NetworkACLRuleReference network_acl_rule_reference_model['deleted'] = 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_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model['id'] = 'r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model['name'] = 'my-allow-inbound-rule' 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['created_at'] = '2024-12-11T06:26:17Z' + network_acl_rule_item_model['destination'] = '0.0.0.0/0' 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/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_item_model['id'] = 'r006-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' + network_acl_rule_item_model['name'] = 'my-allow-inbound-rule' + network_acl_rule_item_model['source'] = '0.0.0.0/0' network_acl_rule_item_model['destination_port_max'] = 22 network_acl_rule_item_model['destination_port_min'] = 22 network_acl_rule_item_model['protocol'] = 'udp' @@ -72164,37 +69648,25 @@ def test_network_acl_collection_serialization(self): network_acl_rule_item_model['source_port_min'] = 49152 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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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_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'] = 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['created_at'] = '2024-12-12T09:24:17Z' + 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 @@ -72273,13 +69745,9 @@ def test_network_acl_reference_serialization(self): # 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' network_acl_reference_model_json['deleted'] = 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['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' @@ -72312,34 +69780,28 @@ def test_network_acl_rule_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules?limit=20' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules?limit=50' deleted_model = {} # Deleted deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' network_acl_rule_reference_model = {} # NetworkACLRuleReference network_acl_rule_reference_model['deleted'] = 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_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model['id'] = 'r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model['name'] = 'my-allow-inbound-rule' 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['created_at'] = '2024-12-11T06:26:17Z' + network_acl_rule_item_model['destination'] = '0.0.0.0/0' 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/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_item_model['id'] = 'r006-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' + network_acl_rule_item_model['name'] = 'my-allow-inbound-rule' + network_acl_rule_item_model['source'] = '0.0.0.0/0' network_acl_rule_item_model['destination_port_max'] = 22 network_acl_rule_item_model['destination_port_min'] = 22 network_acl_rule_item_model['protocol'] = 'udp' @@ -72359,9 +69821,7 @@ def test_network_acl_rule_collection_serialization(self): 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_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 @@ -72385,7 +69845,7 @@ 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['id'] = 'r006-8daca77a-4980-4d33-8f3e-7038797be8f9' # Construct a json representation of a NetworkACLRulePatch model network_acl_rule_patch_model_json = {} @@ -72396,8 +69856,7 @@ def test_network_acl_rule_patch_serialization(self): network_acl_rule_patch_model_json['destination_port_max'] = 22 network_acl_rule_patch_model_json['destination_port_min'] = 22 network_acl_rule_patch_model_json['direction'] = 'inbound' - network_acl_rule_patch_model_json['name'] = 'my-rule-1' - network_acl_rule_patch_model_json['protocol'] = 'tcp' + network_acl_rule_patch_model_json['name'] = 'my-network-acl-rule' network_acl_rule_patch_model_json['source'] = '192.168.3.2/32' network_acl_rule_patch_model_json['source_port_max'] = 65535 network_acl_rule_patch_model_json['source_port_min'] = 49152 @@ -72437,20 +69896,16 @@ def test_network_acl_rule_reference_serialization(self): # Construct a json representation of a NetworkACLRuleReference model network_acl_rule_reference_model_json = {} network_acl_rule_reference_model_json['deleted'] = 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' + network_acl_rule_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model_json['id'] = 'r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model_json['name'] = 'my-network-acl-rule' # 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) 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_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 @@ -72478,45 +69933,31 @@ def test_network_interface_serialization(self): 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:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) + floating_ip_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' floating_ip_reference_model['deleted'] = deleted_model - floating_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) + floating_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' floating_ip_reference_model['id'] = 'r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' floating_ip_reference_model['name'] = 'my-floating-ip' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.0.1.5' reserved_ip_reference_model['deleted'] = deleted_model - reserved_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - ) + reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/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['name'] = 'my-reserved-ip-z1' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_reference_model['deleted'] = 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['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_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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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' @@ -72526,9 +69967,7 @@ def test_network_interface_serialization(self): 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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - ) + network_interface_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' network_interface_model_json['id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' network_interface_model_json['name'] = 'my-instance-network-interface' network_interface_model_json['port_speed'] = 1000 @@ -72573,21 +70012,15 @@ def test_network_interface_bare_metal_server_context_reference_serialization(sel reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' reserved_ip_reference_model['deleted'] = 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['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_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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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' @@ -72595,51 +70028,27 @@ def test_network_interface_bare_metal_server_context_reference_serialization(sel # 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'] = deleted_model - network_interface_bare_metal_server_context_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - ) - network_interface_bare_metal_server_context_reference_model_json['id'] = ( - '0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - ) - 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' + network_interface_bare_metal_server_context_reference_model_json['id'] = '0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' + 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 - ) + 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() - ) - assert ( - network_interface_bare_metal_server_context_reference_model_json2 - == network_interface_bare_metal_server_context_reference_model_json - ) + 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 class TestModel_NetworkInterfaceInstanceContextReference: @@ -72660,21 +70069,15 @@ def test_network_interface_instance_context_reference_serialization(self): reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.0.1.5' reserved_ip_reference_model['deleted'] = deleted_model - reserved_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - ) + reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/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['name'] = 'my-reserved-ip-z1' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' 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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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' @@ -72682,9 +70085,7 @@ def test_network_interface_instance_context_reference_serialization(self): # Construct a json representation of a NetworkInterfaceInstanceContextReference model network_interface_instance_context_reference_model_json = {} network_interface_instance_context_reference_model_json['deleted'] = deleted_model - network_interface_instance_context_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - ) + network_interface_instance_context_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' network_interface_instance_context_reference_model_json['id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' 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 @@ -72692,30 +70093,19 @@ def test_network_interface_instance_context_reference_serialization(self): 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() - ) - assert ( - network_interface_instance_context_reference_model_json2 - == network_interface_instance_context_reference_model_json - ) + 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 class TestModel_NetworkInterfacePatch: @@ -72738,9 +70128,7 @@ def test_network_interface_patch_serialization(self): 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_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 @@ -72763,9 +70151,7 @@ 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' @@ -72789,9 +70175,7 @@ def test_network_interface_prototype_serialization(self): 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_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 @@ -72819,45 +70203,31 @@ def test_network_interface_unpaginated_collection_serialization(self): 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:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) + floating_ip_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' floating_ip_reference_model['deleted'] = deleted_model - floating_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) + floating_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' floating_ip_reference_model['id'] = 'r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' floating_ip_reference_model['name'] = 'my-floating-ip' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.0.1.5' reserved_ip_reference_model['deleted'] = deleted_model - reserved_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - ) + reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/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['name'] = 'my-reserved-ip-z1' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_reference_model['deleted'] = 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['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_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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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' @@ -72866,9 +70236,7 @@ def test_network_interface_unpaginated_collection_serialization(self): network_interface_model['allow_ip_spoofing'] = False network_interface_model['created_at'] = '2024-10-15T03:24:32.993000Z' network_interface_model['floating_ips'] = [floating_ip_reference_model] - network_interface_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - ) + network_interface_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' network_interface_model['id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' network_interface_model['name'] = 'my-instance-network-interface' network_interface_model['port_speed'] = 1000 @@ -72884,27 +70252,19 @@ def test_network_interface_unpaginated_collection_serialization(self): 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() - assert ( - network_interface_unpaginated_collection_model_json2 == network_interface_unpaginated_collection_model_json - ) + assert network_interface_unpaginated_collection_model_json2 == network_interface_unpaginated_collection_model_json class TestModel_OperatingSystem: @@ -72924,9 +70284,7 @@ def test_operating_system_serialization(self): operating_system_model_json['dedicated_host_only'] = False 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-24-04-amd64' - ) + operating_system_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-amd64' operating_system_model_json['name'] = 'ubuntu-24-04-amd64' operating_system_model_json['user_data_format'] = 'cloud_init' operating_system_model_json['vendor'] = 'Canonical' @@ -72988,9 +70346,7 @@ def test_operating_system_collection_serialization(self): 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_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 @@ -73044,21 +70400,15 @@ 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/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 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:r006-418fe842-a3e9-47b9-a938-1aa5bd632871' - ) - placement_group_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r006-418fe842-a3e9-47b9-a938-1aa5bd632871' - ) + placement_group_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r006-418fe842-a3e9-47b9-a938-1aa5bd632871' + placement_group_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r006-418fe842-a3e9-47b9-a938-1aa5bd632871' placement_group_model_json['id'] = 'r006-418fe842-a3e9-47b9-a938-1aa5bd632871' placement_group_model_json['lifecycle_state'] = 'stable' placement_group_model_json['name'] = 'my-placement-group' @@ -73098,20 +70448,14 @@ def test_placement_group_collection_serialization(self): page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/placement_groups?limit=50' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = ( - 'https://resource-controller.cloud.ibm.com/v2/resource_groups/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' placement_group_model = {} # PlacementGroup placement_group_model['created_at'] = '2020-12-29T19:55:00Z' - placement_group_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r006-418fe842-a3e9-47b9-a938-1aa5bd632871' - ) - placement_group_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r006-418fe842-a3e9-47b9-a938-1aa5bd632871' - ) + placement_group_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r006-418fe842-a3e9-47b9-a938-1aa5bd632871' + placement_group_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r006-418fe842-a3e9-47b9-a938-1aa5bd632871' placement_group_model['id'] = 'r006-418fe842-a3e9-47b9-a938-1aa5bd632871' placement_group_model['lifecycle_state'] = 'stable' placement_group_model['name'] = 'my-placement-group' @@ -73132,9 +70476,7 @@ def test_placement_group_collection_serialization(self): 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_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 @@ -73191,32 +70533,22 @@ def test_private_path_service_gateway_serialization(self): deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' load_balancer_reference_model = {} # LoadBalancerReference - load_balancer_reference_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727' - ) + load_balancer_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727' load_balancer_reference_model['deleted'] = deleted_model - load_balancer_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' - ) - load_balancer_reference_model['id'] = 'dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + load_balancer_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + load_balancer_reference_model['id'] = 'r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727' load_balancer_reference_model['name'] = 'my-load-balancer' load_balancer_reference_model['resource_type'] = 'load_balancer' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = ( - 'https://resource-controller.cloud.ibm.com/v2/resource_groups/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' + resource_group_reference_model['name'] = 'Default' 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'] = 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' @@ -73224,17 +70556,13 @@ def test_private_path_service_gateway_serialization(self): # Construct a json representation of a PrivatePathServiceGateway model private_path_service_gateway_model_json = {} private_path_service_gateway_model_json['created_at'] = '2019-01-01T12:00:00Z' - private_path_service_gateway_model_json['crn'] = ( - 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213' - ) + private_path_service_gateway_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5' private_path_service_gateway_model_json['default_access_policy'] = 'deny' private_path_service_gateway_model_json['endpoint_gateway_binding_auto_delete'] = True private_path_service_gateway_model_json['endpoint_gateway_binding_auto_delete_timeout'] = 1 private_path_service_gateway_model_json['endpoint_gateway_count'] = 0 - private_path_service_gateway_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213' - ) - private_path_service_gateway_model_json['id'] = 'r134-fb880975-db45-4459-8548-64e3995ac213' + private_path_service_gateway_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5' + private_path_service_gateway_model_json['id'] = 'r006-7268d425-59b7-48fd-9735-81a7271657d5' private_path_service_gateway_model_json['lifecycle_state'] = 'stable' private_path_service_gateway_model_json['load_balancer'] = load_balancer_reference_model private_path_service_gateway_model_json['name'] = 'my-private-path-service-gateway' @@ -73246,15 +70574,11 @@ def test_private_path_service_gateway_serialization(self): private_path_service_gateway_model_json['zonal_affinity'] = True # Construct a model instance of PrivatePathServiceGateway by calling from_dict on the json representation - private_path_service_gateway_model = PrivatePathServiceGateway.from_dict( - private_path_service_gateway_model_json - ) + private_path_service_gateway_model = PrivatePathServiceGateway.from_dict(private_path_service_gateway_model_json) assert private_path_service_gateway_model != False # Construct a model instance of PrivatePathServiceGateway by calling from_dict on the json representation - private_path_service_gateway_model_dict = PrivatePathServiceGateway.from_dict( - private_path_service_gateway_model_json - ).__dict__ + private_path_service_gateway_model_dict = PrivatePathServiceGateway.from_dict(private_path_service_gateway_model_json).__dict__ private_path_service_gateway_model2 = PrivatePathServiceGateway(**private_path_service_gateway_model_dict) # Verify the model instances are equivalent @@ -73278,7 +70602,7 @@ def test_private_path_service_gateway_account_policy_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['id'] = 'aa2432b1fa4d4ace891e9b80fc104e34' account_reference_model['resource_type'] = 'account' # Construct a json representation of a PrivatePathServiceGatewayAccountPolicy model @@ -73286,39 +70610,24 @@ def test_private_path_service_gateway_account_policy_serialization(self): private_path_service_gateway_account_policy_model_json['access_policy'] = 'deny' private_path_service_gateway_account_policy_model_json['account'] = account_reference_model private_path_service_gateway_account_policy_model_json['created_at'] = '2019-01-01T12:00:00Z' - private_path_service_gateway_account_policy_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213/account_policies/dd455384-b019-4242-9453-45fe68b18e4c' - ) - private_path_service_gateway_account_policy_model_json['id'] = 'r134-fb880975-db45-4459-8548-64e3995ac213' - private_path_service_gateway_account_policy_model_json['resource_type'] = ( - 'private_path_service_gateway_account_policy' - ) + private_path_service_gateway_account_policy_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/dd455384-b019-4242-9453-45fe68b18e4c' + private_path_service_gateway_account_policy_model_json['id'] = 'r006-7268d425-59b7-48fd-9735-81a7271657d5' + private_path_service_gateway_account_policy_model_json['resource_type'] = 'private_path_service_gateway_account_policy' # Construct a model instance of PrivatePathServiceGatewayAccountPolicy by calling from_dict on the json representation - private_path_service_gateway_account_policy_model = PrivatePathServiceGatewayAccountPolicy.from_dict( - private_path_service_gateway_account_policy_model_json - ) + private_path_service_gateway_account_policy_model = PrivatePathServiceGatewayAccountPolicy.from_dict(private_path_service_gateway_account_policy_model_json) assert private_path_service_gateway_account_policy_model != False # Construct a model instance of PrivatePathServiceGatewayAccountPolicy by calling from_dict on the json representation - private_path_service_gateway_account_policy_model_dict = PrivatePathServiceGatewayAccountPolicy.from_dict( - private_path_service_gateway_account_policy_model_json - ).__dict__ - private_path_service_gateway_account_policy_model2 = PrivatePathServiceGatewayAccountPolicy( - **private_path_service_gateway_account_policy_model_dict - ) + private_path_service_gateway_account_policy_model_dict = PrivatePathServiceGatewayAccountPolicy.from_dict(private_path_service_gateway_account_policy_model_json).__dict__ + private_path_service_gateway_account_policy_model2 = PrivatePathServiceGatewayAccountPolicy(**private_path_service_gateway_account_policy_model_dict) # Verify the model instances are equivalent assert private_path_service_gateway_account_policy_model == private_path_service_gateway_account_policy_model2 # Convert model instance back to dict and verify no loss of data - private_path_service_gateway_account_policy_model_json2 = ( - private_path_service_gateway_account_policy_model.to_dict() - ) - assert ( - private_path_service_gateway_account_policy_model_json2 - == private_path_service_gateway_account_policy_model_json - ) + private_path_service_gateway_account_policy_model_json2 = private_path_service_gateway_account_policy_model.to_dict() + assert private_path_service_gateway_account_policy_model_json2 == private_path_service_gateway_account_policy_model_json class TestModel_PrivatePathServiceGatewayAccountPolicyCollection: @@ -73334,70 +70643,42 @@ def test_private_path_service_gateway_account_policy_collection_serialization(se # 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['id'] = 'aa2432b1fa4d4ace891e9b80fc104e34' account_reference_model['resource_type'] = 'account' private_path_service_gateway_account_policy_model = {} # PrivatePathServiceGatewayAccountPolicy - private_path_service_gateway_account_policy_model['access_policy'] = 'deny' + private_path_service_gateway_account_policy_model['access_policy'] = 'permit' private_path_service_gateway_account_policy_model['account'] = account_reference_model - private_path_service_gateway_account_policy_model['created_at'] = '2019-01-01T12:00:00Z' - private_path_service_gateway_account_policy_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213/account_policies/dd455384-b019-4242-9453-45fe68b18e4c' - ) - private_path_service_gateway_account_policy_model['id'] = 'r134-fb880975-db45-4459-8548-64e3995ac213' - private_path_service_gateway_account_policy_model['resource_type'] = ( - 'private_path_service_gateway_account_policy' - ) + private_path_service_gateway_account_policy_model['created_at'] = '2024-11-21T16:56:54Z' + private_path_service_gateway_account_policy_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies/r006-3e2d419a-8ab0-42dd-b616-c5cc598669aa' + private_path_service_gateway_account_policy_model['id'] = 'r006-3e2d419a-8ab0-42dd-b616-c5cc598669aa' + private_path_service_gateway_account_policy_model['resource_type'] = 'private_path_service_gateway_account_policy' page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/65f30e48-3074-4eb0-9ec4-51ce2ec968eb/account_policies?limit=20' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/account_policies?limit=50' # Construct a json representation of a PrivatePathServiceGatewayAccountPolicyCollection model private_path_service_gateway_account_policy_collection_model_json = {} - private_path_service_gateway_account_policy_collection_model_json['account_policies'] = [ - private_path_service_gateway_account_policy_model - ] + private_path_service_gateway_account_policy_collection_model_json['account_policies'] = [private_path_service_gateway_account_policy_model] private_path_service_gateway_account_policy_collection_model_json['first'] = page_link_model private_path_service_gateway_account_policy_collection_model_json['limit'] = 20 private_path_service_gateway_account_policy_collection_model_json['next'] = page_link_model private_path_service_gateway_account_policy_collection_model_json['total_count'] = 132 # Construct a model instance of PrivatePathServiceGatewayAccountPolicyCollection by calling from_dict on the json representation - private_path_service_gateway_account_policy_collection_model = ( - PrivatePathServiceGatewayAccountPolicyCollection.from_dict( - private_path_service_gateway_account_policy_collection_model_json - ) - ) + private_path_service_gateway_account_policy_collection_model = PrivatePathServiceGatewayAccountPolicyCollection.from_dict(private_path_service_gateway_account_policy_collection_model_json) assert private_path_service_gateway_account_policy_collection_model != False # Construct a model instance of PrivatePathServiceGatewayAccountPolicyCollection by calling from_dict on the json representation - private_path_service_gateway_account_policy_collection_model_dict = ( - PrivatePathServiceGatewayAccountPolicyCollection.from_dict( - private_path_service_gateway_account_policy_collection_model_json - ).__dict__ - ) - private_path_service_gateway_account_policy_collection_model2 = ( - PrivatePathServiceGatewayAccountPolicyCollection( - **private_path_service_gateway_account_policy_collection_model_dict - ) - ) + private_path_service_gateway_account_policy_collection_model_dict = PrivatePathServiceGatewayAccountPolicyCollection.from_dict(private_path_service_gateway_account_policy_collection_model_json).__dict__ + private_path_service_gateway_account_policy_collection_model2 = PrivatePathServiceGatewayAccountPolicyCollection(**private_path_service_gateway_account_policy_collection_model_dict) # Verify the model instances are equivalent - assert ( - private_path_service_gateway_account_policy_collection_model - == private_path_service_gateway_account_policy_collection_model2 - ) + assert private_path_service_gateway_account_policy_collection_model == private_path_service_gateway_account_policy_collection_model2 # Convert model instance back to dict and verify no loss of data - private_path_service_gateway_account_policy_collection_model_json2 = ( - private_path_service_gateway_account_policy_collection_model.to_dict() - ) - assert ( - private_path_service_gateway_account_policy_collection_model_json2 - == private_path_service_gateway_account_policy_collection_model_json - ) + private_path_service_gateway_account_policy_collection_model_json2 = private_path_service_gateway_account_policy_collection_model.to_dict() + assert private_path_service_gateway_account_policy_collection_model_json2 == private_path_service_gateway_account_policy_collection_model_json class TestModel_PrivatePathServiceGatewayAccountPolicyPatch: @@ -73415,35 +70696,19 @@ def test_private_path_service_gateway_account_policy_patch_serialization(self): private_path_service_gateway_account_policy_patch_model_json['access_policy'] = 'deny' # Construct a model instance of PrivatePathServiceGatewayAccountPolicyPatch by calling from_dict on the json representation - private_path_service_gateway_account_policy_patch_model = PrivatePathServiceGatewayAccountPolicyPatch.from_dict( - private_path_service_gateway_account_policy_patch_model_json - ) + private_path_service_gateway_account_policy_patch_model = PrivatePathServiceGatewayAccountPolicyPatch.from_dict(private_path_service_gateway_account_policy_patch_model_json) assert private_path_service_gateway_account_policy_patch_model != False # Construct a model instance of PrivatePathServiceGatewayAccountPolicyPatch by calling from_dict on the json representation - private_path_service_gateway_account_policy_patch_model_dict = ( - PrivatePathServiceGatewayAccountPolicyPatch.from_dict( - private_path_service_gateway_account_policy_patch_model_json - ).__dict__ - ) - private_path_service_gateway_account_policy_patch_model2 = PrivatePathServiceGatewayAccountPolicyPatch( - **private_path_service_gateway_account_policy_patch_model_dict - ) + private_path_service_gateway_account_policy_patch_model_dict = PrivatePathServiceGatewayAccountPolicyPatch.from_dict(private_path_service_gateway_account_policy_patch_model_json).__dict__ + private_path_service_gateway_account_policy_patch_model2 = PrivatePathServiceGatewayAccountPolicyPatch(**private_path_service_gateway_account_policy_patch_model_dict) # Verify the model instances are equivalent - assert ( - private_path_service_gateway_account_policy_patch_model - == private_path_service_gateway_account_policy_patch_model2 - ) + assert private_path_service_gateway_account_policy_patch_model == private_path_service_gateway_account_policy_patch_model2 # Convert model instance back to dict and verify no loss of data - private_path_service_gateway_account_policy_patch_model_json2 = ( - private_path_service_gateway_account_policy_patch_model.to_dict() - ) - assert ( - private_path_service_gateway_account_policy_patch_model_json2 - == private_path_service_gateway_account_policy_patch_model_json - ) + private_path_service_gateway_account_policy_patch_model_json2 = private_path_service_gateway_account_policy_patch_model.to_dict() + assert private_path_service_gateway_account_policy_patch_model_json2 == private_path_service_gateway_account_policy_patch_model_json class TestModel_PrivatePathServiceGatewayCollection: @@ -73459,88 +70724,66 @@ def test_private_path_service_gateway_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. page_link_model = {} # PageLink - page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways?limit=20' + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways?limit=50' deleted_model = {} # Deleted deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' load_balancer_reference_model = {} # LoadBalancerReference - load_balancer_reference_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727' - ) + load_balancer_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727' load_balancer_reference_model['deleted'] = deleted_model - load_balancer_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727' - ) - load_balancer_reference_model['id'] = 'dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + load_balancer_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + load_balancer_reference_model['id'] = 'r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727' load_balancer_reference_model['name'] = 'my-load-balancer' load_balancer_reference_model['resource_type'] = 'load_balancer' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = ( - 'https://resource-controller.cloud.ibm.com/v2/resource_groups/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' + resource_group_reference_model['name'] = 'Default' 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'] = 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' private_path_service_gateway_model = {} # PrivatePathServiceGateway - private_path_service_gateway_model['created_at'] = '2019-01-01T12:00:00Z' - private_path_service_gateway_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213' - ) - private_path_service_gateway_model['default_access_policy'] = 'deny' + private_path_service_gateway_model['created_at'] = '2024-11-21T11:59:46Z' + private_path_service_gateway_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5' + private_path_service_gateway_model['default_access_policy'] = 'permit' private_path_service_gateway_model['endpoint_gateway_binding_auto_delete'] = True - private_path_service_gateway_model['endpoint_gateway_binding_auto_delete_timeout'] = 1 - private_path_service_gateway_model['endpoint_gateway_count'] = 0 - private_path_service_gateway_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213' - ) - private_path_service_gateway_model['id'] = 'r134-fb880975-db45-4459-8548-64e3995ac213' + private_path_service_gateway_model['endpoint_gateway_binding_auto_delete_timeout'] = 0 + private_path_service_gateway_model['endpoint_gateway_count'] = 2 + private_path_service_gateway_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5' + private_path_service_gateway_model['id'] = 'r006-7268d425-59b7-48fd-9735-81a7271657d5' private_path_service_gateway_model['lifecycle_state'] = 'stable' private_path_service_gateway_model['load_balancer'] = load_balancer_reference_model private_path_service_gateway_model['name'] = 'my-private-path-service-gateway' private_path_service_gateway_model['published'] = True private_path_service_gateway_model['resource_group'] = resource_group_reference_model private_path_service_gateway_model['resource_type'] = 'private_path_service_gateway' - private_path_service_gateway_model['service_endpoints'] = ['*.example.com'] + private_path_service_gateway_model['service_endpoints'] = ['my-service.example.com'] private_path_service_gateway_model['vpc'] = vpc_reference_model - private_path_service_gateway_model['zonal_affinity'] = True + private_path_service_gateway_model['zonal_affinity'] = False # Construct a json representation of a PrivatePathServiceGatewayCollection model private_path_service_gateway_collection_model_json = {} private_path_service_gateway_collection_model_json['first'] = page_link_model private_path_service_gateway_collection_model_json['limit'] = 20 private_path_service_gateway_collection_model_json['next'] = page_link_model - private_path_service_gateway_collection_model_json['private_path_service_gateways'] = [ - private_path_service_gateway_model - ] + private_path_service_gateway_collection_model_json['private_path_service_gateways'] = [private_path_service_gateway_model] private_path_service_gateway_collection_model_json['total_count'] = 132 # Construct a model instance of PrivatePathServiceGatewayCollection by calling from_dict on the json representation - private_path_service_gateway_collection_model = PrivatePathServiceGatewayCollection.from_dict( - private_path_service_gateway_collection_model_json - ) + private_path_service_gateway_collection_model = PrivatePathServiceGatewayCollection.from_dict(private_path_service_gateway_collection_model_json) assert private_path_service_gateway_collection_model != False # Construct a model instance of PrivatePathServiceGatewayCollection by calling from_dict on the json representation - private_path_service_gateway_collection_model_dict = PrivatePathServiceGatewayCollection.from_dict( - private_path_service_gateway_collection_model_json - ).__dict__ - private_path_service_gateway_collection_model2 = PrivatePathServiceGatewayCollection( - **private_path_service_gateway_collection_model_dict - ) + private_path_service_gateway_collection_model_dict = PrivatePathServiceGatewayCollection.from_dict(private_path_service_gateway_collection_model_json).__dict__ + private_path_service_gateway_collection_model2 = PrivatePathServiceGatewayCollection(**private_path_service_gateway_collection_model_dict) # Verify the model instances are equivalent assert private_path_service_gateway_collection_model == private_path_service_gateway_collection_model2 @@ -73563,7 +70806,7 @@ def test_private_path_service_gateway_endpoint_gateway_binding_serialization(sel # 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['id'] = 'aa2432b1fa4d4ace891e9b80fc104e34' account_reference_model['resource_type'] = 'account' # Construct a json representation of a PrivatePathServiceGatewayEndpointGatewayBinding model @@ -73571,50 +70814,26 @@ def test_private_path_service_gateway_endpoint_gateway_binding_serialization(sel private_path_service_gateway_endpoint_gateway_binding_model_json['account'] = account_reference_model private_path_service_gateway_endpoint_gateway_binding_model_json['created_at'] = '2019-01-01T12:00:00Z' private_path_service_gateway_endpoint_gateway_binding_model_json['expiration_at'] = '2019-01-01T12:00:00Z' - private_path_service_gateway_endpoint_gateway_binding_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213/endpoint_gateway_bindings/r134-ce9dac18-dea0-4392-841c-142d3300674f' - ) - private_path_service_gateway_endpoint_gateway_binding_model_json['id'] = ( - 'r134-ce9dac18-dea0-4392-841c-142d3300674f' - ) + private_path_service_gateway_endpoint_gateway_binding_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/endpoint_gateway_bindings/r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0' + private_path_service_gateway_endpoint_gateway_binding_model_json['id'] = 'r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0' private_path_service_gateway_endpoint_gateway_binding_model_json['lifecycle_state'] = 'stable' - private_path_service_gateway_endpoint_gateway_binding_model_json['resource_type'] = ( - 'private_path_service_gateway_endpoint_gateway_binding' - ) + private_path_service_gateway_endpoint_gateway_binding_model_json['resource_type'] = 'private_path_service_gateway_endpoint_gateway_binding' private_path_service_gateway_endpoint_gateway_binding_model_json['status'] = 'abandoned' # Construct a model instance of PrivatePathServiceGatewayEndpointGatewayBinding by calling from_dict on the json representation - private_path_service_gateway_endpoint_gateway_binding_model = ( - PrivatePathServiceGatewayEndpointGatewayBinding.from_dict( - private_path_service_gateway_endpoint_gateway_binding_model_json - ) - ) + private_path_service_gateway_endpoint_gateway_binding_model = PrivatePathServiceGatewayEndpointGatewayBinding.from_dict(private_path_service_gateway_endpoint_gateway_binding_model_json) assert private_path_service_gateway_endpoint_gateway_binding_model != False # Construct a model instance of PrivatePathServiceGatewayEndpointGatewayBinding by calling from_dict on the json representation - private_path_service_gateway_endpoint_gateway_binding_model_dict = ( - PrivatePathServiceGatewayEndpointGatewayBinding.from_dict( - private_path_service_gateway_endpoint_gateway_binding_model_json - ).__dict__ - ) - private_path_service_gateway_endpoint_gateway_binding_model2 = PrivatePathServiceGatewayEndpointGatewayBinding( - **private_path_service_gateway_endpoint_gateway_binding_model_dict - ) + private_path_service_gateway_endpoint_gateway_binding_model_dict = PrivatePathServiceGatewayEndpointGatewayBinding.from_dict(private_path_service_gateway_endpoint_gateway_binding_model_json).__dict__ + private_path_service_gateway_endpoint_gateway_binding_model2 = PrivatePathServiceGatewayEndpointGatewayBinding(**private_path_service_gateway_endpoint_gateway_binding_model_dict) # Verify the model instances are equivalent - assert ( - private_path_service_gateway_endpoint_gateway_binding_model - == private_path_service_gateway_endpoint_gateway_binding_model2 - ) + assert private_path_service_gateway_endpoint_gateway_binding_model == private_path_service_gateway_endpoint_gateway_binding_model2 # Convert model instance back to dict and verify no loss of data - private_path_service_gateway_endpoint_gateway_binding_model_json2 = ( - private_path_service_gateway_endpoint_gateway_binding_model.to_dict() - ) - assert ( - private_path_service_gateway_endpoint_gateway_binding_model_json2 - == private_path_service_gateway_endpoint_gateway_binding_model_json - ) + private_path_service_gateway_endpoint_gateway_binding_model_json2 = private_path_service_gateway_endpoint_gateway_binding_model.to_dict() + assert private_path_service_gateway_endpoint_gateway_binding_model_json2 == private_path_service_gateway_endpoint_gateway_binding_model_json class TestModel_PrivatePathServiceGatewayEndpointGatewayBindingCollection: @@ -73630,74 +70849,44 @@ def test_private_path_service_gateway_endpoint_gateway_binding_collection_serial # 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['id'] = 'aa2432b1fa4d4ace891e9b80fc104e34' account_reference_model['resource_type'] = 'account' - private_path_service_gateway_endpoint_gateway_binding_model = ( - {} - ) # PrivatePathServiceGatewayEndpointGatewayBinding + private_path_service_gateway_endpoint_gateway_binding_model = {} # PrivatePathServiceGatewayEndpointGatewayBinding private_path_service_gateway_endpoint_gateway_binding_model['account'] = account_reference_model - private_path_service_gateway_endpoint_gateway_binding_model['created_at'] = '2019-01-01T12:00:00Z' - private_path_service_gateway_endpoint_gateway_binding_model['expiration_at'] = '2019-01-01T12:00:00Z' - private_path_service_gateway_endpoint_gateway_binding_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213/endpoint_gateway_bindings/r134-ce9dac18-dea0-4392-841c-142d3300674f' - ) - private_path_service_gateway_endpoint_gateway_binding_model['id'] = 'r134-ce9dac18-dea0-4392-841c-142d3300674f' + private_path_service_gateway_endpoint_gateway_binding_model['created_at'] = '2024-11-21T16:56:54Z' + private_path_service_gateway_endpoint_gateway_binding_model['expiration_at'] = '2024-11-24T16:56:54Z' + private_path_service_gateway_endpoint_gateway_binding_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/endpoint_gateway_bindings/r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0' + private_path_service_gateway_endpoint_gateway_binding_model['id'] = 'r006-7c30adc3-083d-46a1-a72c-d0ca8654a1d0' private_path_service_gateway_endpoint_gateway_binding_model['lifecycle_state'] = 'stable' - private_path_service_gateway_endpoint_gateway_binding_model['resource_type'] = ( - 'private_path_service_gateway_endpoint_gateway_binding' - ) - private_path_service_gateway_endpoint_gateway_binding_model['status'] = 'abandoned' + private_path_service_gateway_endpoint_gateway_binding_model['resource_type'] = 'private_path_service_gateway_endpoint_gateway_binding' + private_path_service_gateway_endpoint_gateway_binding_model['status'] = 'permitted' page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/65f30e48-3074-4eb0-9ec4-51ce2ec968eb/endpoint_gateway_bindings?limit=20' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5/endpoint_gateway_bindings?limit=50' # Construct a json representation of a PrivatePathServiceGatewayEndpointGatewayBindingCollection model private_path_service_gateway_endpoint_gateway_binding_collection_model_json = {} - private_path_service_gateway_endpoint_gateway_binding_collection_model_json['endpoint_gateway_bindings'] = [ - private_path_service_gateway_endpoint_gateway_binding_model - ] + private_path_service_gateway_endpoint_gateway_binding_collection_model_json['endpoint_gateway_bindings'] = [private_path_service_gateway_endpoint_gateway_binding_model] private_path_service_gateway_endpoint_gateway_binding_collection_model_json['first'] = page_link_model private_path_service_gateway_endpoint_gateway_binding_collection_model_json['limit'] = 20 private_path_service_gateway_endpoint_gateway_binding_collection_model_json['next'] = page_link_model private_path_service_gateway_endpoint_gateway_binding_collection_model_json['total_count'] = 132 # Construct a model instance of PrivatePathServiceGatewayEndpointGatewayBindingCollection by calling from_dict on the json representation - private_path_service_gateway_endpoint_gateway_binding_collection_model = ( - PrivatePathServiceGatewayEndpointGatewayBindingCollection.from_dict( - private_path_service_gateway_endpoint_gateway_binding_collection_model_json - ) - ) + private_path_service_gateway_endpoint_gateway_binding_collection_model = PrivatePathServiceGatewayEndpointGatewayBindingCollection.from_dict(private_path_service_gateway_endpoint_gateway_binding_collection_model_json) assert private_path_service_gateway_endpoint_gateway_binding_collection_model != False # Construct a model instance of PrivatePathServiceGatewayEndpointGatewayBindingCollection by calling from_dict on the json representation - private_path_service_gateway_endpoint_gateway_binding_collection_model_dict = ( - PrivatePathServiceGatewayEndpointGatewayBindingCollection.from_dict( - private_path_service_gateway_endpoint_gateway_binding_collection_model_json - ).__dict__ - ) - private_path_service_gateway_endpoint_gateway_binding_collection_model2 = ( - PrivatePathServiceGatewayEndpointGatewayBindingCollection( - **private_path_service_gateway_endpoint_gateway_binding_collection_model_dict - ) - ) + private_path_service_gateway_endpoint_gateway_binding_collection_model_dict = PrivatePathServiceGatewayEndpointGatewayBindingCollection.from_dict(private_path_service_gateway_endpoint_gateway_binding_collection_model_json).__dict__ + private_path_service_gateway_endpoint_gateway_binding_collection_model2 = PrivatePathServiceGatewayEndpointGatewayBindingCollection(**private_path_service_gateway_endpoint_gateway_binding_collection_model_dict) # Verify the model instances are equivalent - assert ( - private_path_service_gateway_endpoint_gateway_binding_collection_model - == private_path_service_gateway_endpoint_gateway_binding_collection_model2 - ) + assert private_path_service_gateway_endpoint_gateway_binding_collection_model == private_path_service_gateway_endpoint_gateway_binding_collection_model2 # Convert model instance back to dict and verify no loss of data - private_path_service_gateway_endpoint_gateway_binding_collection_model_json2 = ( - private_path_service_gateway_endpoint_gateway_binding_collection_model.to_dict() - ) - assert ( - private_path_service_gateway_endpoint_gateway_binding_collection_model_json2 - == private_path_service_gateway_endpoint_gateway_binding_collection_model_json - ) + private_path_service_gateway_endpoint_gateway_binding_collection_model_json2 = private_path_service_gateway_endpoint_gateway_binding_collection_model.to_dict() + assert private_path_service_gateway_endpoint_gateway_binding_collection_model_json2 == private_path_service_gateway_endpoint_gateway_binding_collection_model_json class TestModel_PrivatePathServiceGatewayPatch: @@ -73713,7 +70902,7 @@ def test_private_path_service_gateway_patch_serialization(self): # Construct dict forms of any model objects needed in order to build this model. load_balancer_identity_model = {} # LoadBalancerIdentityById - load_balancer_identity_model['id'] = 'dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + load_balancer_identity_model['id'] = 'r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727' # Construct a json representation of a PrivatePathServiceGatewayPatch model private_path_service_gateway_patch_model_json = {} @@ -73723,18 +70912,12 @@ def test_private_path_service_gateway_patch_serialization(self): private_path_service_gateway_patch_model_json['zonal_affinity'] = True # Construct a model instance of PrivatePathServiceGatewayPatch by calling from_dict on the json representation - private_path_service_gateway_patch_model = PrivatePathServiceGatewayPatch.from_dict( - private_path_service_gateway_patch_model_json - ) + private_path_service_gateway_patch_model = PrivatePathServiceGatewayPatch.from_dict(private_path_service_gateway_patch_model_json) assert private_path_service_gateway_patch_model != False # Construct a model instance of PrivatePathServiceGatewayPatch by calling from_dict on the json representation - private_path_service_gateway_patch_model_dict = PrivatePathServiceGatewayPatch.from_dict( - private_path_service_gateway_patch_model_json - ).__dict__ - private_path_service_gateway_patch_model2 = PrivatePathServiceGatewayPatch( - **private_path_service_gateway_patch_model_dict - ) + private_path_service_gateway_patch_model_dict = PrivatePathServiceGatewayPatch.from_dict(private_path_service_gateway_patch_model_json).__dict__ + private_path_service_gateway_patch_model2 = PrivatePathServiceGatewayPatch(**private_path_service_gateway_patch_model_dict) # Verify the model instances are equivalent assert private_path_service_gateway_patch_model == private_path_service_gateway_patch_model2 @@ -73770,18 +70953,12 @@ def test_private_path_service_gateway_remote_serialization(self): private_path_service_gateway_remote_model_json['region'] = region_reference_model # Construct a model instance of PrivatePathServiceGatewayRemote by calling from_dict on the json representation - private_path_service_gateway_remote_model = PrivatePathServiceGatewayRemote.from_dict( - private_path_service_gateway_remote_model_json - ) + private_path_service_gateway_remote_model = PrivatePathServiceGatewayRemote.from_dict(private_path_service_gateway_remote_model_json) assert private_path_service_gateway_remote_model != False # Construct a model instance of PrivatePathServiceGatewayRemote by calling from_dict on the json representation - private_path_service_gateway_remote_model_dict = PrivatePathServiceGatewayRemote.from_dict( - private_path_service_gateway_remote_model_json - ).__dict__ - private_path_service_gateway_remote_model2 = PrivatePathServiceGatewayRemote( - **private_path_service_gateway_remote_model_dict - ) + private_path_service_gateway_remote_model_dict = PrivatePathServiceGatewayRemote.from_dict(private_path_service_gateway_remote_model_json).__dict__ + private_path_service_gateway_remote_model2 = PrivatePathServiceGatewayRemote(**private_path_service_gateway_remote_model_dict) # Verify the model instances are equivalent assert private_path_service_gateway_remote_model == private_path_service_gateway_remote_model2 @@ -73808,31 +70985,21 @@ def test_public_gateway_serialization(self): 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:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) + public_gateway_floating_ip_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' public_gateway_floating_ip_model['deleted'] = deleted_model - public_gateway_floating_ip_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) + public_gateway_floating_ip_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' public_gateway_floating_ip_model['id'] = 'r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' 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['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['name'] = 'Default' 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'] = 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' @@ -73844,14 +71011,10 @@ def test_public_gateway_serialization(self): # 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['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241' + public_gateway_model_json['id'] = 'r006-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_type'] = 'public_gateway' @@ -73888,38 +71051,28 @@ def test_public_gateway_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. page_link_model = {} # PageLink - page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways?limit=20' + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways?limit=50' deleted_model = {} # Deleted 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:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) + public_gateway_floating_ip_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' public_gateway_floating_ip_model['deleted'] = deleted_model - public_gateway_floating_ip_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) + public_gateway_floating_ip_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' public_gateway_floating_ip_model['id'] = 'r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' 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['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['name'] = 'Default' 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'] = 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' @@ -73929,15 +71082,11 @@ def test_public_gateway_collection_serialization(self): 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['created_at'] = '2024-11-07T06:47:25Z' + public_gateway_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-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['id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241' + public_gateway_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241' + public_gateway_model['id'] = 'r006-dc5431ef-1fc6-4861-adc9-a59d077d1241' public_gateway_model['name'] = 'my-public-gateway' public_gateway_model['resource_group'] = resource_group_reference_model public_gateway_model['resource_type'] = 'public_gateway' @@ -73958,9 +71107,7 @@ def test_public_gateway_collection_serialization(self): 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_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 @@ -73989,13 +71136,9 @@ def test_public_gateway_floating_ip_serialization(self): # 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:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) + public_gateway_floating_ip_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' public_gateway_floating_ip_model_json['deleted'] = deleted_model - public_gateway_floating_ip_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) + public_gateway_floating_ip_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' public_gateway_floating_ip_model_json['id'] = 'r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' public_gateway_floating_ip_model_json['name'] = 'my-floating-ip' @@ -74004,9 +71147,7 @@ def test_public_gateway_floating_ip_serialization(self): 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_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 @@ -74064,14 +71205,10 @@ def test_public_gateway_reference_serialization(self): # 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['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241' public_gateway_reference_model_json['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241' + public_gateway_reference_model_json['id'] = 'r006-dc5431ef-1fc6-4861-adc9-a59d077d1241' public_gateway_reference_model_json['name'] = 'my-public-gateway' public_gateway_reference_model_json['resource_type'] = 'public_gateway' @@ -74080,9 +71217,7 @@ def test_public_gateway_reference_serialization(self): 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_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 @@ -74219,26 +71354,20 @@ def test_reservation_serialization(self): reservation_committed_use_model['expiration_policy'] = 'renew' reservation_committed_use_model['term'] = 'one_year' - reservation_profile_model = {} # ReservationProfile + reservation_profile_model = {} # ReservationProfileInstanceProfileReference reservation_profile_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' reservation_profile_model['name'] = 'bx2-4x16' 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/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' 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['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' @@ -74246,16 +71375,12 @@ def test_reservation_serialization(self): # Construct a json representation of a Reservation model reservation_model_json = {} - reservation_model_json['affinity_policy'] = 'restricted' + reservation_model_json['affinity_policy'] = 'automatic' reservation_model_json['capacity'] = reservation_capacity_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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63' - ) - reservation_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63' - ) + reservation_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63' reservation_model_json['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' reservation_model_json['lifecycle_state'] = 'stable' reservation_model_json['name'] = 'my-reservation' @@ -74335,9 +71460,7 @@ def test_reservation_capacity_patch_serialization(self): 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_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 @@ -74363,18 +71486,12 @@ 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 @@ -74411,26 +71528,20 @@ def test_reservation_collection_serialization(self): reservation_committed_use_model['expiration_policy'] = 'renew' reservation_committed_use_model['term'] = 'one_year' - reservation_profile_model = {} # ReservationProfile + reservation_profile_model = {} # ReservationProfileInstanceProfileReference reservation_profile_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' reservation_profile_model['name'] = 'bx2-4x16' 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/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' 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['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' @@ -74441,12 +71552,8 @@ def test_reservation_collection_serialization(self): reservation_model['capacity'] = reservation_capacity_model reservation_model['committed_use'] = reservation_committed_use_model reservation_model['created_at'] = '2020-12-29T19:55:00Z' - reservation_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63' - ) - reservation_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63' - ) + reservation_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63' + reservation_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63' reservation_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' reservation_model['lifecycle_state'] = 'stable' reservation_model['name'] = 'my-reservation' @@ -74502,9 +71609,7 @@ def test_reservation_committed_use_serialization(self): 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_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 @@ -74531,18 +71636,12 @@ def test_reservation_committed_use_patch_serialization(self): 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 @@ -74568,18 +71667,12 @@ def test_reservation_committed_use_prototype_serialization(self): 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 @@ -74610,10 +71703,11 @@ def test_reservation_patch_serialization(self): reservation_profile_patch_model = {} # ReservationProfilePatch reservation_profile_patch_model['name'] = 'bx2-4x16' - reservation_profile_patch_model['resource_type'] = 'instance_profile' + reservation_profile_patch_model['resource_type'] = 'bare_metal_server_profile' # Construct a json representation of a ReservationPatch model reservation_patch_model_json = {} + reservation_patch_model_json['affinity_policy'] = 'automatic' 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' @@ -74635,38 +71729,6 @@ def test_reservation_patch_serialization(self): assert reservation_patch_model_json2 == reservation_patch_model_json -class TestModel_ReservationProfile: - """ - Test Class for ReservationProfile - """ - - def test_reservation_profile_serialization(self): - """ - Test serialization/deserialization for ReservationProfile - """ - - # 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['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) - 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) - - # Verify the model instances are equivalent - assert reservation_profile_model == reservation_profile_model2 - - # Convert model instance back to dict and verify no loss of data - reservation_profile_model_json2 = reservation_profile_model.to_dict() - assert reservation_profile_model_json2 == reservation_profile_model_json - - class TestModel_ReservationProfilePatch: """ Test Class for ReservationProfilePatch @@ -74680,16 +71742,14 @@ 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'] = 'bare_metal_server_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) 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_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 @@ -74713,18 +71773,14 @@ 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'] = 'bare_metal_server_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_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 @@ -74752,13 +71808,9 @@ def test_reservation_reference_serialization(self): # Construct a json representation of a ReservationReference model reservation_reference_model_json = {} - reservation_reference_model_json['crn'] = ( - 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63' - ) + reservation_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63' reservation_reference_model_json['deleted'] = deleted_model - reservation_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63' - ) + reservation_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-ba49df72-37b8-43ac-98da-f8e029de0e63' reservation_reference_model_json['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' reservation_reference_model_json['name'] = 'my-reservation' reservation_reference_model_json['resource_type'] = 'reservation' @@ -74792,21 +71844,15 @@ 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['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) 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_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 @@ -74833,14 +71879,10 @@ def test_reserved_ip_serialization(self): 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' reserved_ip_target_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' + reserved_ip_target_model['id'] = 'r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' reserved_ip_target_model['name'] = 'my-endpoint-gateway' reserved_ip_target_model['resource_type'] = 'endpoint_gateway' @@ -74849,9 +71891,7 @@ 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['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' @@ -74888,22 +71928,16 @@ def test_reserved_ip_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0716-b28a7e6d-a66b-4de7-8713-15dcffdce401/reserved_ips?limit=50' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-b28a7e6d-a66b-4de7-8713-15dcffdce401/reserved_ips?limit=50' deleted_model = {} # Deleted 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' reserved_ip_target_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' + reserved_ip_target_model['id'] = 'r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' reserved_ip_target_model['name'] = 'my-endpoint-gateway' reserved_ip_target_model['resource_type'] = 'endpoint_gateway' @@ -74911,12 +71945,10 @@ def test_reserved_ip_collection_serialization(self): reserved_ip_model['address'] = '10.0.1.5' reserved_ip_model['auto_delete'] = False reserved_ip_model['created_at'] = '2024-10-15T19:52:13Z' - reserved_ip_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - ) + reserved_ip_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/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' + reserved_ip_model['name'] = 'my-reserved-ip-z1' reserved_ip_model['owner'] = 'user' reserved_ip_model['resource_type'] = 'subnet_reserved_ip' reserved_ip_model['target'] = reserved_ip_target_model @@ -74958,21 +71990,15 @@ def test_reserved_ip_collection_bare_metal_server_network_interface_context_seri # Construct dict forms of any model objects needed in order to build this model. page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6/ips?limit=20' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6/ips?limit=20' deleted_model = {} # Deleted 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' reserved_ip_target_model['deleted'] = deleted_model - reserved_ip_target_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - ) + reserved_ip_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' reserved_ip_target_model['id'] = '0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' reserved_ip_target_model['name'] = 'my-primary-network-interface' reserved_ip_target_model['resource_type'] = 'network_interface' @@ -74981,12 +72007,10 @@ def test_reserved_ip_collection_bare_metal_server_network_interface_context_seri reserved_ip_model['address'] = '10.0.1.5' reserved_ip_model['auto_delete'] = False reserved_ip_model['created_at'] = '2024-10-15T19:52:13Z' - reserved_ip_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - ) + reserved_ip_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/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' + reserved_ip_model['name'] = 'my-reserved-ip-z1' reserved_ip_model['owner'] = 'user' reserved_ip_model['resource_type'] = 'subnet_reserved_ip' reserved_ip_model['target'] = reserved_ip_target_model @@ -75000,39 +72024,19 @@ def test_reserved_ip_collection_bare_metal_server_network_interface_context_seri 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 - ) + 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() - ) - assert ( - reserved_ip_collection_bare_metal_server_network_interface_context_model_json2 - == reserved_ip_collection_bare_metal_server_network_interface_context_model_json - ) + 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 class TestModel_ReservedIPCollectionEndpointGatewayContext: @@ -75048,36 +72052,28 @@ def test_reserved_ip_collection_endpoint_gateway_context_serialization(self): # Construct dict forms of any model objects needed in order to build this model. page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/d7cc5196-9864-48c4-82d8-3f30da41fcc5/ips?limit=20' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0/ips?limit=50' deleted_model = {} # Deleted 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' reserved_ip_target_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' + reserved_ip_target_model['id'] = 'r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' reserved_ip_target_model['name'] = 'my-endpoint-gateway' reserved_ip_target_model['resource_type'] = 'endpoint_gateway' reserved_ip_model = {} # ReservedIP - reserved_ip_model['address'] = '192.168.3.4' + reserved_ip_model['address'] = '10.0.1.5' 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['created_at'] = '2024-10-15T19:52:13Z' + reserved_ip_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/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' - reserved_ip_model['owner'] = 'provider' + reserved_ip_model['name'] = 'my-reserved-ip-z1' + reserved_ip_model['owner'] = 'user' reserved_ip_model['resource_type'] = 'subnet_reserved_ip' reserved_ip_model['target'] = reserved_ip_target_model @@ -75090,35 +72086,19 @@ def test_reserved_ip_collection_endpoint_gateway_context_serialization(self): 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 - ) + 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() - ) - assert ( - reserved_ip_collection_endpoint_gateway_context_model_json2 - == reserved_ip_collection_endpoint_gateway_context_model_json - ) + 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 class TestModel_ReservedIPCollectionInstanceNetworkInterfaceContext: @@ -75134,36 +72114,28 @@ def test_reserved_ip_collection_instance_network_interface_context_serialization # Construct dict forms of any model objects needed in order to build this model. page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7/ips?limit=20' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7/ips?limit=50' deleted_model = {} # Deleted 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' reserved_ip_target_model['deleted'] = 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' + reserved_ip_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' + reserved_ip_target_model['id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' + reserved_ip_target_model['name'] = 'my-instance-network-interface' + reserved_ip_target_model['resource_type'] = 'network_interface' reserved_ip_model = {} # ReservedIP - reserved_ip_model['address'] = '192.168.3.4' + reserved_ip_model['address'] = '10.0.1.5' 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['created_at'] = '2024-10-15T19:52:13Z' + reserved_ip_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/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' - reserved_ip_model['owner'] = 'provider' + reserved_ip_model['name'] = 'my-reserved-ip-z1' + reserved_ip_model['owner'] = 'user' reserved_ip_model['resource_type'] = 'subnet_reserved_ip' reserved_ip_model['target'] = reserved_ip_target_model @@ -75176,39 +72148,19 @@ def test_reserved_ip_collection_instance_network_interface_context_serialization 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 - ) + 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() - ) - assert ( - reserved_ip_collection_instance_network_interface_context_model_json2 - == reserved_ip_collection_instance_network_interface_context_model_json - ) + 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 class TestModel_ReservedIPCollectionVirtualNetworkInterfaceContext: @@ -75224,21 +72176,17 @@ def test_reserved_ip_collection_virtual_network_interface_context_serialization( # Construct dict forms of any model objects needed in order to build this model. page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7/ips?limit=20' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-fa41aecb-4f21-423d-8082-630bfba1e1d9/ips?limit=50' deleted_model = {} # Deleted 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['address'] = '10.0.1.5' reserved_ip_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/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['name'] = 'my-reserved-ip-z1-1' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' # Construct a json representation of a ReservedIPCollectionVirtualNetworkInterfaceContext model @@ -75250,39 +72198,19 @@ def test_reserved_ip_collection_virtual_network_interface_context_serialization( 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 - ) + 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() - ) - assert ( - reserved_ip_collection_virtual_network_interface_context_model_json2 - == reserved_ip_collection_virtual_network_interface_context_model_json - ) + 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 class TestModel_ReservedIPPatch: @@ -75335,9 +72263,7 @@ def test_reserved_ip_reference_serialization(self): reserved_ip_reference_model_json = {} reserved_ip_reference_model_json['address'] = '192.168.3.4' reserved_ip_reference_model_json['deleted'] = 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['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' @@ -75400,9 +72326,7 @@ 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['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' @@ -75411,9 +72335,7 @@ def test_resource_group_reference_serialization(self): 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_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 @@ -75436,6 +72358,17 @@ def test_route_serialization(self): # Construct dict forms of any model objects needed in order to build this model. + deleted_model = {} # Deleted + deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + route_creator_model = {} # RouteCreatorVPNGatewayReference + route_creator_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b' + route_creator_model['deleted'] = deleted_model + route_creator_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b' + route_creator_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + route_creator_model['name'] = 'my-vpn-gateway' + route_creator_model['resource_type'] = 'vpn_gateway' + route_next_hop_model = {} # RouteNextHopIP route_next_hop_model['address'] = '192.168.3.4' @@ -75448,10 +72381,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['creator'] = route_creator_model 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['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' @@ -75489,9 +72421,18 @@ def test_route_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. page_link_model = {} # PageLink - page_link_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' - ) + page_link_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' + + deleted_model = {} # Deleted + deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + route_creator_model = {} # RouteCreatorVPNGatewayReference + route_creator_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b' + route_creator_model['deleted'] = deleted_model + route_creator_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b' + route_creator_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + route_creator_model['name'] = 'my-vpn-gateway' + route_creator_model['resource_type'] = 'vpn_gateway' route_next_hop_model = {} # RouteNextHopIP route_next_hop_model['address'] = '192.168.3.4' @@ -75504,10 +72445,9 @@ def test_route_collection_serialization(self): route_model['action'] = 'delegate' route_model['advertise'] = True route_model['created_at'] = '2019-01-01T12:00:00Z' + route_model['creator'] = route_creator_model 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['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' @@ -75553,9 +72493,18 @@ def test_route_collection_vpc_context_serialization(self): # Construct dict forms of any model objects needed in order to build this model. page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531' + + deleted_model = {} # Deleted + deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + route_creator_model = {} # RouteCreatorVPNGatewayReference + route_creator_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b' + route_creator_model['deleted'] = deleted_model + route_creator_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b' + route_creator_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b' + route_creator_model['name'] = 'my-vpn-gateway' + route_creator_model['resource_type'] = 'vpn_gateway' route_next_hop_model = {} # RouteNextHopIP route_next_hop_model['address'] = '192.168.3.4' @@ -75568,10 +72517,9 @@ def test_route_collection_vpc_context_serialization(self): route_model['action'] = 'delegate' route_model['advertise'] = True route_model['created_at'] = '2019-01-01T12:00:00Z' + route_model['creator'] = route_creator_model 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['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' @@ -75589,15 +72537,11 @@ def test_route_collection_vpc_context_serialization(self): 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_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 @@ -75708,9 +72652,7 @@ def test_route_reference_serialization(self): # Construct a json representation of a RouteReference model route_reference_model_json = {} route_reference_model_json['deleted'] = 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['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' @@ -75746,9 +72688,7 @@ def test_routing_table_serialization(self): resource_filter_model['resource_type'] = 'vpn_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['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'Default' @@ -75757,22 +72697,16 @@ def test_routing_table_serialization(self): route_reference_model = {} # RouteReference route_reference_model['deleted'] = 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['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_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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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['name'] = 'my-subnet-z1-1' subnet_reference_model['resource_type'] = 'subnet' # Construct a json representation of a RoutingTable model @@ -75780,12 +72714,8 @@ def test_routing_table_serialization(self): 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['created_at'] = '2019-01-01T12:00:00Z' - routing_table_model_json['crn'] = ( - 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/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' @@ -75828,17 +72758,13 @@ def test_routing_table_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables?limit=50' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/routing_tables?limit=50' resource_filter_model = {} # ResourceFilter resource_filter_model['resource_type'] = 'vpn_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['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'Default' @@ -75847,34 +72773,24 @@ def test_routing_table_collection_serialization(self): route_reference_model = {} # RouteReference route_reference_model['deleted'] = 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['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_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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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['name'] = 'my-subnet-z1-1' subnet_reference_model['resource_type'] = 'subnet' routing_table_model = {} # RoutingTable 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['crn'] = ( - 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/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' @@ -75901,9 +72817,7 @@ def test_routing_table_collection_serialization(self): 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_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 @@ -75972,13 +72886,9 @@ def test_routing_table_reference_serialization(self): # Construct a json representation of a RoutingTableReference model routing_table_reference_model_json = {} - routing_table_reference_model_json['crn'] = ( - 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' - ) + routing_table_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' routing_table_reference_model_json['deleted'] = 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['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' @@ -75988,9 +72898,7 @@ def test_routing_table_reference_serialization(self): 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_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 @@ -76014,9 +72922,7 @@ 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['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'Default' @@ -76028,9 +72934,7 @@ def test_security_group_serialization(self): security_group_rule_model = {} # SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP security_group_rule_model['direction'] = 'inbound' - security_group_rule_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-b597cff2-38e8-4e6e-999d-000002172691' - ) + security_group_rule_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-b597cff2-38e8-4e6e-999d-000002172691' security_group_rule_model['id'] = 'r006-b597cff2-38e8-4e6e-999d-000002172691' security_group_rule_model['ip_version'] = 'ipv4' security_group_rule_model['local'] = security_group_rule_local_model @@ -76044,21 +72948,15 @@ def test_security_group_serialization(self): security_group_target_reference_model = {} # SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext security_group_target_reference_model['deleted'] = deleted_model - security_group_target_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - ) + security_group_target_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' security_group_target_reference_model['id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' security_group_target_reference_model['name'] = 'my-instance-network-interface' security_group_target_reference_model['resource_type'] = 'network_interface' 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'] = 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' @@ -76066,12 +72964,8 @@ 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['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 @@ -76111,9 +73005,7 @@ def test_security_group_collection_serialization(self): page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups?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['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'Default' @@ -76125,9 +73017,7 @@ def test_security_group_collection_serialization(self): security_group_rule_model = {} # SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP security_group_rule_model['direction'] = 'inbound' - security_group_rule_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-b597cff2-38e8-4e6e-999d-000002172691' - ) + security_group_rule_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-b597cff2-38e8-4e6e-999d-000002172691' security_group_rule_model['id'] = 'r006-b597cff2-38e8-4e6e-999d-000002172691' security_group_rule_model['ip_version'] = 'ipv4' security_group_rule_model['local'] = security_group_rule_local_model @@ -76141,33 +73031,23 @@ def test_security_group_collection_serialization(self): security_group_target_reference_model = {} # SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext security_group_target_reference_model['deleted'] = deleted_model - security_group_target_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - ) + security_group_target_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' security_group_target_reference_model['id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' security_group_target_reference_model['name'] = 'my-instance-network-interface' security_group_target_reference_model['resource_type'] = 'network_interface' 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'] = 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'] = '2024-11-04T17:52:13Z' - 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 @@ -76188,9 +73068,7 @@ def test_security_group_collection_serialization(self): 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_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 @@ -76248,13 +73126,9 @@ def test_security_group_reference_serialization(self): # 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_reference_model_json['deleted'] = 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['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' @@ -76263,9 +73137,7 @@ def test_security_group_reference_serialization(self): 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_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 @@ -76296,9 +73168,7 @@ def test_security_group_rule_collection_serialization(self): security_group_rule_model = {} # SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP security_group_rule_model['direction'] = 'inbound' - security_group_rule_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-b597cff2-38e8-4e6e-999d-000002172691' - ) + security_group_rule_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-b597cff2-38e8-4e6e-999d-000002172691' security_group_rule_model['id'] = 'r006-b597cff2-38e8-4e6e-999d-000002172691' security_group_rule_model['ip_version'] = 'ipv4' security_group_rule_model['local'] = security_group_rule_local_model @@ -76312,15 +73182,11 @@ def test_security_group_rule_collection_serialization(self): 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_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 @@ -76365,9 +73231,7 @@ def test_security_group_rule_patch_serialization(self): 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_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 @@ -76391,18 +73255,14 @@ def test_security_group_target_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/targets?limit=20' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/targets?limit=50' deleted_model = {} # Deleted deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' security_group_target_reference_model = {} # SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext security_group_target_reference_model['deleted'] = deleted_model - security_group_target_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - ) + security_group_target_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' security_group_target_reference_model['id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' security_group_target_reference_model['name'] = 'my-instance-network-interface' security_group_target_reference_model['resource_type'] = 'network_interface' @@ -76416,18 +73276,12 @@ def test_security_group_target_collection_serialization(self): 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 @@ -76450,22 +73304,16 @@ 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/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f' - ) + share_accessor_binding_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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['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 @@ -76480,9 +73328,7 @@ def test_share_serialization(self): 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['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' deleted_model = {} # Deleted @@ -76490,9 +73336,7 @@ def test_share_serialization(self): share_mount_target_reference_model = {} # ShareMountTargetReference share_mount_target_reference_model['deleted'] = deleted_model - share_mount_target_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c' - ) + share_mount_target_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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' @@ -76510,13 +73354,9 @@ def test_share_serialization(self): 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:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58' - ) + share_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58' share_reference_model['deleted'] = deleted_model - share_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58' - ) + share_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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 @@ -76529,20 +73369,22 @@ def test_share_serialization(self): 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_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['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' + share_source_snapshot_model = {} # ShareSourceSnapshotShareSnapshotReference + share_source_snapshot_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4' + share_source_snapshot_model['deleted'] = deleted_model + share_source_snapshot_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4' + share_source_snapshot_model['id'] = 'r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4' + share_source_snapshot_model['name'] = 'my-share-snapshot' + share_source_snapshot_model['resource_type'] = 'share_snapshot' + 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' @@ -76554,14 +73396,10 @@ def test_share_serialization(self): 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:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58' - ) + share_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-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/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58' - ) + share_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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 @@ -76580,7 +73418,10 @@ def test_share_serialization(self): share_model_json['resource_group'] = resource_group_reference_model share_model_json['resource_type'] = 'share' share_model_json['size'] = 200 + share_model_json['snapshot_count'] = 0 + share_model_json['snapshot_size'] = 0 share_model_json['source_share'] = share_reference_model + share_model_json['source_snapshot'] = share_source_snapshot_model share_model_json['user_tags'] = ['testString'] share_model_json['zone'] = zone_reference_model @@ -76628,13 +73469,9 @@ def test_share_accessor_binding_serialization(self): 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['crn'] = 'crn:v1:bluemix:public:pm-20:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:6500f05d-a5b5-4ecf-91ba-0d12b9dee607::' share_accessor_binding_accessor_model['deleted'] = deleted_model - share_accessor_binding_accessor_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58' - ) + share_accessor_binding_accessor_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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 @@ -76644,9 +73481,7 @@ def test_share_accessor_binding_serialization(self): 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/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f' - ) + share_accessor_binding_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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' @@ -76695,13 +73530,9 @@ def test_share_accessor_binding_collection_serialization(self): 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:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58' - ) + share_accessor_binding_accessor_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58' share_accessor_binding_accessor_model['deleted'] = deleted_model - share_accessor_binding_accessor_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58' - ) + share_accessor_binding_accessor_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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 @@ -76710,17 +73541,13 @@ def test_share_accessor_binding_collection_serialization(self): 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/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f' - ) + share_accessor_binding_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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' page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings?limit=20' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings?limit=20' # Construct a json representation of a ShareAccessorBindingCollection model share_accessor_binding_collection_model_json = {} @@ -76731,18 +73558,12 @@ def test_share_accessor_binding_collection_serialization(self): 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 - ) + 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 - ) + 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 @@ -76764,25 +73585,17 @@ def test_share_accessor_binding_reference_serialization(self): # 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/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f' - ) + share_accessor_binding_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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 - ) + 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 - ) + 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 @@ -76808,22 +73621,16 @@ def test_share_collection_serialization(self): page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares?limit=20' share_accessor_binding_reference_model = {} # ShareAccessorBindingReference - share_accessor_binding_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/accessor_bindings/r134-ae9bdc18-aed0-4392-841c-142d3300674f' - ) + share_accessor_binding_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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['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 @@ -76838,9 +73645,7 @@ def test_share_collection_serialization(self): 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['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' deleted_model = {} # Deleted @@ -76848,9 +73653,7 @@ def test_share_collection_serialization(self): share_mount_target_reference_model = {} # ShareMountTargetReference share_mount_target_reference_model['deleted'] = deleted_model - share_mount_target_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c' - ) + share_mount_target_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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' @@ -76868,13 +73671,9 @@ def test_share_collection_serialization(self): 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:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58' - ) + share_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58' share_reference_model['deleted'] = deleted_model - share_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58' - ) + share_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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 @@ -76887,20 +73686,22 @@ def test_share_collection_serialization(self): 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_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['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' + share_source_snapshot_model = {} # ShareSourceSnapshotShareSnapshotReference + share_source_snapshot_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4' + share_source_snapshot_model['deleted'] = deleted_model + share_source_snapshot_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4' + share_source_snapshot_model['id'] = 'r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4' + share_source_snapshot_model['name'] = 'my-share-snapshot' + share_source_snapshot_model['resource_type'] = 'share_snapshot' + 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' @@ -76911,9 +73712,7 @@ def test_share_collection_serialization(self): 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:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58' - ) + share_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-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/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58' @@ -76935,7 +73734,10 @@ def test_share_collection_serialization(self): share_model['resource_group'] = resource_group_reference_model share_model['resource_type'] = 'share' share_model['size'] = 200 + share_model['snapshot_count'] = 0 + share_model['snapshot_size'] = 0 share_model['source_share'] = share_reference_model + share_model['source_snapshot'] = share_source_snapshot_model share_model['user_tags'] = ['testString'] share_model['zone'] = zone_reference_model @@ -77008,9 +73810,7 @@ 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['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 @@ -77048,12 +73848,8 @@ 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) @@ -77116,9 +73912,7 @@ def test_share_lifecycle_reason_serialization(self): # 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['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 @@ -77155,46 +73949,30 @@ def test_share_mount_target_serialization(self): reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' reserved_ip_reference_model['deleted'] = 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['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_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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) - virtual_network_interface_reference_attachment_context_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) + 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + virtual_network_interface_reference_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' virtual_network_interface_reference_attachment_context_model['id'] = '0717-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' 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'] = 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' @@ -77203,22 +73981,16 @@ 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/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c' - ) + share_mount_target_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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['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 @@ -77250,9 +74022,7 @@ def test_share_mount_target_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets?limit=20' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets?limit=20' deleted_model = {} # Deleted deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' @@ -77260,46 +74030,30 @@ def test_share_mount_target_collection_serialization(self): reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' reserved_ip_reference_model['deleted'] = 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['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_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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) - virtual_network_interface_reference_attachment_context_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) + 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + virtual_network_interface_reference_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' virtual_network_interface_reference_attachment_context_model['id'] = '0717-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' 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'] = 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' @@ -77307,9 +74061,7 @@ 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/r006-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/r006-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' @@ -77318,9 +74070,7 @@ def test_share_mount_target_collection_serialization(self): 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 # Construct a json representation of a ShareMountTargetCollection model @@ -77332,15 +74082,11 @@ def test_share_mount_target_collection_serialization(self): 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_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 @@ -77370,9 +74116,7 @@ def test_share_mount_target_patch_serialization(self): 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_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 @@ -77401,23 +74145,17 @@ def test_share_mount_target_reference_serialization(self): # Construct a json representation of a ShareMountTargetReference model share_mount_target_reference_model_json = {} share_mount_target_reference_model_json['deleted'] = deleted_model - share_mount_target_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c' - ) + share_mount_target_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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_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 @@ -77559,9 +74297,7 @@ def test_share_profile_collection_serialization(self): 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_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 @@ -77593,9 +74329,7 @@ def test_share_profile_reference_serialization(self): 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_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 @@ -77618,16 +74352,12 @@ 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 = {} # 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' @@ -77641,34 +74371,22 @@ def test_share_prototype_share_context_serialization(self): 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 = {} # 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['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['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['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 = {} # 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' @@ -77689,15 +74407,11 @@ def test_share_prototype_share_context_serialization(self): 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_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 @@ -77737,13 +74451,9 @@ def test_share_reference_serialization(self): # 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:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58' - ) + share_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58' share_reference_model_json['deleted'] = deleted_model - share_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58' - ) + share_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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 @@ -77819,26 +74529,16 @@ 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['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 @@ -77848,6 +74548,280 @@ def test_share_replication_status_reason_serialization(self): assert share_replication_status_reason_model_json2 == share_replication_status_reason_model_json +class TestModel_ShareSnapshot: + """ + Test Class for ShareSnapshot + """ + + def test_share_snapshot_serialization(self): + """ + Test serialization/deserialization for ShareSnapshot + """ + + # Construct dict forms of any model objects needed in order to build this model. + + deleted_model = {} # Deleted + 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['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'] = deleted_model + backup_policy_plan_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model['id'] = 'r006-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' + + share_snapshot_lifecycle_reason_model = {} # ShareSnapshotLifecycleReason + share_snapshot_lifecycle_reason_model['code'] = 'resource_suspended_by_provider' + share_snapshot_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + share_snapshot_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['name'] = 'Default' + + share_snapshot_status_reason_model = {} # ShareSnapshotStatusReason + share_snapshot_status_reason_model['code'] = 'encryption_key_deleted' + share_snapshot_status_reason_model['message'] = 'testString' + share_snapshot_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys' + + 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' + + # Construct a json representation of a ShareSnapshot model + share_snapshot_model_json = {} + share_snapshot_model_json['backup_policy_plan'] = backup_policy_plan_reference_model + share_snapshot_model_json['captured_at'] = '2019-01-01T12:00:00Z' + share_snapshot_model_json['created_at'] = '2019-01-01T12:00:00Z' + share_snapshot_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4' + share_snapshot_model_json['fingerprint'] = '7abc3aef-c2bc-4f65-a296-2928e534d498' + share_snapshot_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4' + share_snapshot_model_json['id'] = 'r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4' + share_snapshot_model_json['lifecycle_reasons'] = [share_snapshot_lifecycle_reason_model] + share_snapshot_model_json['lifecycle_state'] = 'stable' + share_snapshot_model_json['minimum_size'] = 10 + share_snapshot_model_json['name'] = 'my-share-snapshot' + share_snapshot_model_json['resource_group'] = resource_group_reference_model + share_snapshot_model_json['resource_type'] = 'share_snapshot' + share_snapshot_model_json['status'] = 'available' + share_snapshot_model_json['status_reasons'] = [share_snapshot_status_reason_model] + share_snapshot_model_json['user_tags'] = ['testString'] + share_snapshot_model_json['zone'] = zone_reference_model + + # Construct a model instance of ShareSnapshot by calling from_dict on the json representation + share_snapshot_model = ShareSnapshot.from_dict(share_snapshot_model_json) + assert share_snapshot_model != False + + # Construct a model instance of ShareSnapshot by calling from_dict on the json representation + share_snapshot_model_dict = ShareSnapshot.from_dict(share_snapshot_model_json).__dict__ + share_snapshot_model2 = ShareSnapshot(**share_snapshot_model_dict) + + # Verify the model instances are equivalent + assert share_snapshot_model == share_snapshot_model2 + + # Convert model instance back to dict and verify no loss of data + share_snapshot_model_json2 = share_snapshot_model.to_dict() + assert share_snapshot_model_json2 == share_snapshot_model_json + + +class TestModel_ShareSnapshotCollection: + """ + Test Class for ShareSnapshotCollection + """ + + def test_share_snapshot_collection_serialization(self): + """ + Test serialization/deserialization for ShareSnapshotCollection + """ + + # Construct dict forms of any model objects needed in order to build this model. + + page_link_model = {} # PageLink + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-a0c07083-f411-446c-9316-7b08d6448c86/snapshots?limit=50' + + deleted_model = {} # Deleted + 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['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'] = deleted_model + backup_policy_plan_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model['id'] = 'r006-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' + + share_snapshot_lifecycle_reason_model = {} # ShareSnapshotLifecycleReason + share_snapshot_lifecycle_reason_model['code'] = 'resource_suspended_by_provider' + share_snapshot_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + share_snapshot_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['name'] = 'Default' + + share_snapshot_status_reason_model = {} # ShareSnapshotStatusReason + share_snapshot_status_reason_model['code'] = 'encryption_key_deleted' + share_snapshot_status_reason_model['message'] = 'testString' + share_snapshot_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys' + + 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' + + share_snapshot_model = {} # ShareSnapshot + share_snapshot_model['backup_policy_plan'] = backup_policy_plan_reference_model + share_snapshot_model['captured_at'] = '2024-04-29T01:21:12Z' + share_snapshot_model['created_at'] = '2024-04-29T01:59:46Z' + share_snapshot_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4' + share_snapshot_model['fingerprint'] = '7abc3aef-c2bc-4f65-a296-2928e534d498' + share_snapshot_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4' + share_snapshot_model['id'] = 'r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4' + share_snapshot_model['lifecycle_reasons'] = [share_snapshot_lifecycle_reason_model] + share_snapshot_model['lifecycle_state'] = 'stable' + share_snapshot_model['minimum_size'] = 10 + share_snapshot_model['name'] = 'my-share-snapshot' + share_snapshot_model['resource_group'] = resource_group_reference_model + share_snapshot_model['resource_type'] = 'share_snapshot' + share_snapshot_model['status'] = 'available' + share_snapshot_model['status_reasons'] = [share_snapshot_status_reason_model] + share_snapshot_model['user_tags'] = [] + share_snapshot_model['zone'] = zone_reference_model + + # Construct a json representation of a ShareSnapshotCollection model + share_snapshot_collection_model_json = {} + share_snapshot_collection_model_json['first'] = page_link_model + share_snapshot_collection_model_json['limit'] = 20 + share_snapshot_collection_model_json['next'] = page_link_model + share_snapshot_collection_model_json['snapshots'] = [share_snapshot_model] + share_snapshot_collection_model_json['total_count'] = 132 + + # Construct a model instance of ShareSnapshotCollection by calling from_dict on the json representation + share_snapshot_collection_model = ShareSnapshotCollection.from_dict(share_snapshot_collection_model_json) + assert share_snapshot_collection_model != False + + # Construct a model instance of ShareSnapshotCollection by calling from_dict on the json representation + share_snapshot_collection_model_dict = ShareSnapshotCollection.from_dict(share_snapshot_collection_model_json).__dict__ + share_snapshot_collection_model2 = ShareSnapshotCollection(**share_snapshot_collection_model_dict) + + # Verify the model instances are equivalent + assert share_snapshot_collection_model == share_snapshot_collection_model2 + + # Convert model instance back to dict and verify no loss of data + share_snapshot_collection_model_json2 = share_snapshot_collection_model.to_dict() + assert share_snapshot_collection_model_json2 == share_snapshot_collection_model_json + + +class TestModel_ShareSnapshotLifecycleReason: + """ + Test Class for ShareSnapshotLifecycleReason + """ + + def test_share_snapshot_lifecycle_reason_serialization(self): + """ + Test serialization/deserialization for ShareSnapshotLifecycleReason + """ + + # Construct a json representation of a ShareSnapshotLifecycleReason model + share_snapshot_lifecycle_reason_model_json = {} + share_snapshot_lifecycle_reason_model_json['code'] = 'resource_suspended_by_provider' + share_snapshot_lifecycle_reason_model_json['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.' + share_snapshot_lifecycle_reason_model_json['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension' + + # Construct a model instance of ShareSnapshotLifecycleReason by calling from_dict on the json representation + share_snapshot_lifecycle_reason_model = ShareSnapshotLifecycleReason.from_dict(share_snapshot_lifecycle_reason_model_json) + assert share_snapshot_lifecycle_reason_model != False + + # Construct a model instance of ShareSnapshotLifecycleReason by calling from_dict on the json representation + share_snapshot_lifecycle_reason_model_dict = ShareSnapshotLifecycleReason.from_dict(share_snapshot_lifecycle_reason_model_json).__dict__ + share_snapshot_lifecycle_reason_model2 = ShareSnapshotLifecycleReason(**share_snapshot_lifecycle_reason_model_dict) + + # Verify the model instances are equivalent + assert share_snapshot_lifecycle_reason_model == share_snapshot_lifecycle_reason_model2 + + # Convert model instance back to dict and verify no loss of data + share_snapshot_lifecycle_reason_model_json2 = share_snapshot_lifecycle_reason_model.to_dict() + assert share_snapshot_lifecycle_reason_model_json2 == share_snapshot_lifecycle_reason_model_json + + +class TestModel_ShareSnapshotPatch: + """ + Test Class for ShareSnapshotPatch + """ + + def test_share_snapshot_patch_serialization(self): + """ + Test serialization/deserialization for ShareSnapshotPatch + """ + + # Construct a json representation of a ShareSnapshotPatch model + share_snapshot_patch_model_json = {} + share_snapshot_patch_model_json['user_tags'] = ['testString'] + + # Construct a model instance of ShareSnapshotPatch by calling from_dict on the json representation + share_snapshot_patch_model = ShareSnapshotPatch.from_dict(share_snapshot_patch_model_json) + assert share_snapshot_patch_model != False + + # Construct a model instance of ShareSnapshotPatch by calling from_dict on the json representation + share_snapshot_patch_model_dict = ShareSnapshotPatch.from_dict(share_snapshot_patch_model_json).__dict__ + share_snapshot_patch_model2 = ShareSnapshotPatch(**share_snapshot_patch_model_dict) + + # Verify the model instances are equivalent + assert share_snapshot_patch_model == share_snapshot_patch_model2 + + # Convert model instance back to dict and verify no loss of data + share_snapshot_patch_model_json2 = share_snapshot_patch_model.to_dict() + assert share_snapshot_patch_model_json2 == share_snapshot_patch_model_json + + +class TestModel_ShareSnapshotStatusReason: + """ + Test Class for ShareSnapshotStatusReason + """ + + def test_share_snapshot_status_reason_serialization(self): + """ + Test serialization/deserialization for ShareSnapshotStatusReason + """ + + # Construct a json representation of a ShareSnapshotStatusReason model + share_snapshot_status_reason_model_json = {} + share_snapshot_status_reason_model_json['code'] = 'encryption_key_deleted' + share_snapshot_status_reason_model_json['message'] = 'testString' + share_snapshot_status_reason_model_json['more_info'] = 'https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys' + + # Construct a model instance of ShareSnapshotStatusReason by calling from_dict on the json representation + share_snapshot_status_reason_model = ShareSnapshotStatusReason.from_dict(share_snapshot_status_reason_model_json) + assert share_snapshot_status_reason_model != False + + # Construct a model instance of ShareSnapshotStatusReason by calling from_dict on the json representation + share_snapshot_status_reason_model_dict = ShareSnapshotStatusReason.from_dict(share_snapshot_status_reason_model_json).__dict__ + share_snapshot_status_reason_model2 = ShareSnapshotStatusReason(**share_snapshot_status_reason_model_dict) + + # Verify the model instances are equivalent + assert share_snapshot_status_reason_model == share_snapshot_status_reason_model2 + + # Convert model instance back to dict and verify no loss of data + share_snapshot_status_reason_model_json2 = share_snapshot_status_reason_model.to_dict() + assert share_snapshot_status_reason_model_json2 == share_snapshot_status_reason_model_json + + class TestModel_Snapshot: """ Test Class for Snapshot @@ -77872,24 +74846,18 @@ def test_snapshot_serialization(self): backup_policy_plan_reference_model = {} # BackupPolicyPlanReference backup_policy_plan_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model['id'] = 'r006-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' 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['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'] = 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' - ) + 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 @@ -77913,22 +74881,16 @@ def test_snapshot_serialization(self): 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'] = 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['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 @@ -77943,20 +74905,14 @@ def test_snapshot_serialization(self): 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['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_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['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'] = 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['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' @@ -77966,26 +74922,18 @@ 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'] = deleted_model - image_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/images/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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_source_snapshot_model['deleted'] = 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['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 @@ -77995,13 +74943,9 @@ def test_snapshot_serialization(self): 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'] = deleted_model - volume_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/volumes/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 @@ -78016,15 +74960,11 @@ def test_snapshot_serialization(self): 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 @@ -78073,15 +75013,11 @@ def test_snapshot_catalog_offering_serialization(self): 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['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'] = 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' - ) + 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 = {} @@ -78093,9 +75029,7 @@ def test_snapshot_catalog_offering_serialization(self): 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_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 @@ -78174,9 +75108,7 @@ def test_snapshot_clone_collection_serialization(self): 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_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 @@ -78211,9 +75143,7 @@ def test_snapshot_clone_prototype_serialization(self): 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_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 @@ -78251,24 +75181,18 @@ def test_snapshot_collection_serialization(self): backup_policy_plan_reference_model = {} # BackupPolicyPlanReference backup_policy_plan_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model['id'] = 'r006-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' 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['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'] = 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' - ) + 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 @@ -78292,22 +75216,16 @@ def test_snapshot_collection_serialization(self): 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'] = 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['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 @@ -78322,20 +75240,14 @@ def test_snapshot_collection_serialization(self): 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['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_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['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'] = 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['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' @@ -78345,26 +75257,18 @@ 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'] = deleted_model - image_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/images/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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_source_snapshot_model['deleted'] = 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['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 @@ -78374,13 +75278,9 @@ def test_snapshot_collection_serialization(self): 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'] = deleted_model - volume_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/volumes/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 @@ -78394,15 +75294,11 @@ def test_snapshot_collection_serialization(self): 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 @@ -78467,18 +75363,14 @@ def test_snapshot_consistency_group_serialization(self): backup_policy_plan_reference_model = {} # BackupPolicyPlanReference backup_policy_plan_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model['id'] = 'r006-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' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = ( - 'https://resource-controller.cloud.ibm.com/v2/resource_groups/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' @@ -78491,13 +75383,9 @@ def test_snapshot_consistency_group_serialization(self): 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'] = deleted_model - snapshot_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/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 @@ -78507,13 +75395,9 @@ def test_snapshot_consistency_group_serialization(self): 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['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['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' @@ -78527,9 +75411,7 @@ def test_snapshot_consistency_group_serialization(self): 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_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 @@ -78567,18 +75449,14 @@ def test_snapshot_consistency_group_collection_serialization(self): backup_policy_plan_reference_model = {} # BackupPolicyPlanReference backup_policy_plan_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model['id'] = 'r006-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' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = ( - 'https://resource-controller.cloud.ibm.com/v2/resource_groups/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' @@ -78591,13 +75469,9 @@ def test_snapshot_consistency_group_collection_serialization(self): 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'] = deleted_model - snapshot_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/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 @@ -78606,13 +75480,9 @@ def test_snapshot_consistency_group_collection_serialization(self): snapshot_consistency_group_model = {} # SnapshotConsistencyGroup 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['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' @@ -78626,24 +75496,16 @@ def test_snapshot_consistency_group_collection_serialization(self): snapshot_consistency_group_collection_model_json['first'] = page_link_model snapshot_consistency_group_collection_model_json['limit'] = 20 snapshot_consistency_group_collection_model_json['next'] = page_link_model - snapshot_consistency_group_collection_model_json['snapshot_consistency_groups'] = [ - snapshot_consistency_group_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 @@ -78669,18 +75531,12 @@ def test_snapshot_consistency_group_patch_serialization(self): 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 @@ -78707,30 +75563,20 @@ def test_snapshot_consistency_group_reference_serialization(self): # 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['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'] = 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['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 @@ -78769,13 +75615,9 @@ 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_copies_item_model_json['deleted'] = 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['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 @@ -78850,37 +75692,19 @@ def test_snapshot_prototype_snapshot_consistency_group_context_serialization(sel 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 - ) + 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() - ) - assert ( - snapshot_prototype_snapshot_consistency_group_context_model_json2 - == snapshot_prototype_snapshot_consistency_group_context_model_json - ) + 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 class TestModel_SnapshotReference: @@ -78912,13 +75736,9 @@ 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_reference_model_json['deleted'] = 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['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 @@ -79010,13 +75830,9 @@ 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' snapshot_source_snapshot_model_json['deleted'] = 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['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 @@ -79027,9 +75843,7 @@ def test_snapshot_source_snapshot_serialization(self): 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_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 @@ -79056,55 +75870,37 @@ def test_subnet_serialization(self): 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' network_acl_reference_model['deleted'] = 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['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_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['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241' public_gateway_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241' + public_gateway_reference_model['id'] = 'r006-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['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_model = {} # RoutingTableReference - routing_table_reference_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' - ) + routing_table_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' routing_table_reference_model['deleted'] = 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['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_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'] = 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' @@ -79117,12 +75913,8 @@ def test_subnet_serialization(self): 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' @@ -79172,55 +75964,37 @@ def test_subnet_collection_serialization(self): 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' network_acl_reference_model['deleted'] = 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['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_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['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241' public_gateway_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241' + public_gateway_reference_model['id'] = 'r006-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['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_model = {} # RoutingTableReference - routing_table_reference_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' - ) + routing_table_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' routing_table_reference_model['deleted'] = 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['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_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'] = 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' @@ -79232,12 +76006,8 @@ def test_subnet_collection_serialization(self): 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' @@ -79292,7 +76062,7 @@ def test_subnet_patch_serialization(self): 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['id'] = 'r006-dc5431ef-1fc6-4861-adc9-a59d077d1241' routing_table_identity_model = {} # RoutingTableIdentityById routing_table_identity_model['id'] = '6885e83f-03b2-4603-8a86-db2a0f55c840' @@ -79337,13 +76107,9 @@ def test_subnet_reference_serialization(self): # 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'] = 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['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' @@ -79376,9 +76142,7 @@ 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['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' @@ -79387,9 +76151,7 @@ def test_trusted_profile_reference_serialization(self): 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_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 @@ -79459,36 +76221,24 @@ def test_vpc_serialization(self): 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' network_acl_reference_model['deleted'] = 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['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_model = {} # RoutingTableReference - routing_table_reference_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' - ) + routing_table_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' routing_table_reference_model['deleted'] = 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['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_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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_reference_model['deleted'] = 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['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' @@ -79512,9 +76262,7 @@ def test_vpc_serialization(self): vpc_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-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['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'Default' @@ -79522,9 +76270,7 @@ def test_vpc_serialization(self): 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 @@ -79625,36 +76371,24 @@ def test_vpc_collection_serialization(self): 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::network-acl:r006-a4e28308-8ee7-46ab-8108-9f881f22bdbf' network_acl_reference_model['deleted'] = 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['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_model = {} # RoutingTableReference - routing_table_reference_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' - ) + routing_table_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' routing_table_reference_model['deleted'] = 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['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_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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_reference_model['deleted'] = 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['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' @@ -79678,18 +76412,14 @@ def test_vpc_collection_serialization(self): vpc_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshoot-hub-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['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 @@ -79764,13 +76494,9 @@ def test_vpcdns_serialization(self): 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_dns_resolver_context_model['deleted'] = 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['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 @@ -79920,37 +76646,25 @@ def test_vpcdns_resolution_binding_serialization(self): 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' + endpoint_gateway_reference_remote_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' + endpoint_gateway_reference_remote_model['id'] = 'r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' 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-1' - ) + 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-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['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 @@ -79962,9 +76676,7 @@ def test_vpcdns_resolution_binding_serialization(self): 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['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' @@ -79976,9 +76688,7 @@ def test_vpcdns_resolution_binding_serialization(self): 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_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 @@ -80014,37 +76724,25 @@ def test_vpcdns_resolution_binding_collection_serialization(self): 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' + endpoint_gateway_reference_remote_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' + endpoint_gateway_reference_remote_model['id'] = 'r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' 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-1' - ) + 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-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['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 @@ -80055,9 +76753,7 @@ def test_vpcdns_resolution_binding_collection_serialization(self): 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['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' @@ -80065,9 +76761,7 @@ def test_vpcdns_resolution_binding_collection_serialization(self): vpcdns_resolution_binding_model['vpc'] = vpc_reference_remote_model page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings?limit=20' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/dns_resolution_bindings?limit=20' # Construct a json representation of a VPCDNSResolutionBindingCollection model vpcdns_resolution_binding_collection_model_json = {} @@ -80078,18 +76772,12 @@ def test_vpcdns_resolution_binding_collection_serialization(self): 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 @@ -80112,26 +76800,16 @@ 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-1' - ) + 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-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 @@ -80156,18 +76834,12 @@ def test_vpcdns_resolution_binding_patch_serialization(self): 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 @@ -80234,9 +76906,7 @@ 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['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-1' # Construct a model instance of VPCHealthReason by calling from_dict on the json representation @@ -80324,13 +76994,9 @@ def test_vpc_reference_serialization(self): # 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'] = 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['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' @@ -80380,31 +77046,21 @@ 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['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'] = 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['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['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 @@ -80440,12 +77096,8 @@ 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['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 @@ -80528,9 +77180,7 @@ def test_vpn_gateway_collection_serialization(self): vpn_gateway_connection_reference_model = {} # VPNGatewayConnectionReference vpn_gateway_connection_reference_model['deleted'] = 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['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' @@ -80542,31 +77192,23 @@ def test_vpn_gateway_collection_serialization(self): 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['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['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['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_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' reserved_ip_reference_model['deleted'] = 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['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' @@ -80584,32 +77226,22 @@ def test_vpn_gateway_collection_serialization(self): 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['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_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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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_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'] = 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' @@ -80617,14 +77249,10 @@ def test_vpn_gateway_collection_serialization(self): vpn_gateway_model = {} # VPNGatewayRouteMode 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_state'] = 'stable' @@ -80675,15 +77303,11 @@ def test_vpn_gateway_connection_cid_rs_serialization(self): 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_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 @@ -80716,34 +77340,24 @@ def test_vpn_gateway_connection_collection_serialization(self): ike_policy_reference_model = {} # IKEPolicyReference ike_policy_reference_model['deleted'] = 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['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_model = {} # IPsecPolicyReference i_psec_policy_reference_model['deleted'] = 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['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_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 = {} # VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN vpn_gateway_connection_ike_identity_model['type'] = 'ipv4_address' vpn_gateway_connection_ike_identity_model['value'] = '192.0.2.4' @@ -80751,9 +77365,7 @@ def test_vpn_gateway_connection_collection_serialization(self): 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 = {} # 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' @@ -80765,9 +77377,7 @@ def test_vpn_gateway_connection_collection_serialization(self): 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['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 @@ -80781,9 +77391,7 @@ def test_vpn_gateway_connection_collection_serialization(self): vpn_gateway_connection_model['peer'] = vpn_gateway_connection_policy_mode_peer_model page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections?limit=20' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections?limit=20' # Construct a json representation of a VPNGatewayConnectionCollection model vpn_gateway_connection_collection_model_json = {} @@ -80794,18 +77402,12 @@ def test_vpn_gateway_connection_collection_serialization(self): 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 @@ -80836,9 +77438,7 @@ def test_vpn_gateway_connection_dpd_serialization(self): 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_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 @@ -80866,18 +77466,12 @@ 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 @@ -80904,18 +77498,12 @@ 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 @@ -80945,14 +77533,10 @@ def test_vpn_gateway_connection_patch_serialization(self): 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 = {} # 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 @@ -80968,15 +77552,11 @@ def test_vpn_gateway_connection_patch_serialization(self): vpn_gateway_connection_patch_model_json['psk'] = 'lkj14b1oi0alcniejkso' # 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_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 @@ -80999,41 +77579,29 @@ 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' # 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'] = ['192.168.1.0/24'] - vpn_gateway_connection_policy_mode_local_model_json['ike_identities'] = [ - vpn_gateway_connection_ike_identity_model - ] + 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() - assert ( - vpn_gateway_connection_policy_mode_local_model_json2 == vpn_gateway_connection_policy_mode_local_model_json - ) + assert vpn_gateway_connection_policy_mode_local_model_json2 == vpn_gateway_connection_policy_mode_local_model_json class TestModel_VPNGatewayConnectionPolicyModeLocalPrototype: @@ -81048,51 +77616,29 @@ def test_vpn_gateway_connection_policy_mode_local_prototype_serialization(self): # 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' # 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'] = ['192.168.1.0/24'] - 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['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 - ) + 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() - ) - assert ( - vpn_gateway_connection_policy_mode_local_prototype_model_json2 - == vpn_gateway_connection_policy_mode_local_prototype_model_json - ) + 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 class TestModel_VPNGatewayConnectionReference: @@ -81113,26 +77659,18 @@ def test_vpn_gateway_connection_reference_serialization(self): # Construct a json representation of a VPNGatewayConnectionReference model vpn_gateway_connection_reference_model_json = {} vpn_gateway_connection_reference_model_json['deleted'] = 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['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 @@ -81154,46 +77692,28 @@ 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' # 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 - ) + 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() - ) - assert ( - vpn_gateway_connection_static_route_mode_local_model_json2 - == vpn_gateway_connection_static_route_mode_local_model_json - ) + 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 class TestModel_VPNGatewayConnectionStaticRouteModeLocalPrototype: @@ -81208,52 +77728,28 @@ def test_vpn_gateway_connection_static_route_mode_local_prototype_serialization( # 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' # 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 - ) + 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() - ) - assert ( - vpn_gateway_connection_static_route_mode_local_prototype_model_json2 - == vpn_gateway_connection_static_route_mode_local_prototype_model_json - ) + 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 class TestModel_VPNGatewayConnectionStaticRouteModeTunnel: @@ -81273,51 +77769,29 @@ def test_vpn_gateway_connection_static_route_mode_tunnel_serialization(self): 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['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['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 - ) + 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() - ) - assert ( - vpn_gateway_connection_static_route_mode_tunnel_model_json2 - == vpn_gateway_connection_static_route_mode_tunnel_model_json - ) + 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 class TestModel_VPNGatewayConnectionStatusReason: @@ -81333,26 +77807,16 @@ 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['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 @@ -81375,38 +77839,23 @@ 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['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() - ) - assert ( - vpn_gateway_connection_tunnel_status_reason_model_json2 - == vpn_gateway_connection_tunnel_status_reason_model_json - ) + 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 class TestModel_VPNGatewayHealthReason: @@ -81422,9 +77871,7 @@ 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['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 @@ -81432,9 +77879,7 @@ def test_vpn_gateway_health_reason_serialization(self): 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_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 @@ -81458,21 +77903,15 @@ 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['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_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 @@ -81497,16 +77936,12 @@ def test_vpn_gateway_member_serialization(self): 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['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['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' deleted_model = {} # Deleted @@ -81515,9 +77950,7 @@ def test_vpn_gateway_member_serialization(self): reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' reserved_ip_reference_model['deleted'] = 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['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' @@ -81564,24 +77997,16 @@ 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['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 @@ -81604,26 +78029,16 @@ 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['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 @@ -81676,9 +78091,7 @@ 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['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' @@ -81692,16 +78105,12 @@ def test_vpn_server_serialization(self): 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['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['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' deleted_model = {} # Deleted @@ -81710,51 +78119,35 @@ def test_vpn_server_serialization(self): reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' reserved_ip_reference_model['deleted'] = 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['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['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_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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_reference_model['deleted'] = 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['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_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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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_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'] = 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' @@ -81769,16 +78162,12 @@ def test_vpn_server_serialization(self): 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_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['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' @@ -81829,9 +78218,7 @@ 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['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 @@ -81875,9 +78262,7 @@ 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['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 @@ -81886,9 +78271,7 @@ def test_vpn_server_client_collection_serialization(self): vpn_server_client_model['username'] = 'testString' page_link_model = {} # PageLink - page_link_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' - ) + page_link_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' # Construct a json representation of a VPNServerClientCollection model vpn_server_client_collection_model_json = {} @@ -81899,15 +78282,11 @@ def test_vpn_server_client_collection_serialization(self): 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_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 @@ -81934,9 +78313,7 @@ def test_vpn_server_collection_serialization(self): page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers?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['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' @@ -81950,16 +78327,12 @@ def test_vpn_server_collection_serialization(self): 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['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['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' deleted_model = {} # Deleted @@ -81968,51 +78341,35 @@ def test_vpn_server_collection_serialization(self): reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' reserved_ip_reference_model['deleted'] = 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['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['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_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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_reference_model['deleted'] = 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['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_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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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_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'] = 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' @@ -82026,16 +78383,12 @@ def test_vpn_server_collection_serialization(self): 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['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_state'] = 'stable' @@ -82086,9 +78439,7 @@ 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['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 @@ -82096,9 +78447,7 @@ def test_vpn_server_health_reason_serialization(self): 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_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 @@ -82122,9 +78471,7 @@ 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['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 @@ -82132,9 +78479,7 @@ def test_vpn_server_lifecycle_reason_serialization(self): 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_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 @@ -82158,20 +78503,14 @@ 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['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_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' @@ -82223,15 +78562,11 @@ 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_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['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 @@ -82241,9 +78576,7 @@ def test_vpn_server_route_serialization(self): 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['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' @@ -82279,22 +78612,16 @@ def test_vpn_server_route_collection_serialization(self): # Construct dict forms of any model objects needed in order to build this model. page_link_model = {} # PageLink - page_link_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routes?limit=20' - ) + page_link_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routes?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_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['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 @@ -82303,9 +78630,7 @@ def test_vpn_server_route_collection_serialization(self): 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['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' @@ -82325,9 +78650,7 @@ def test_vpn_server_route_collection_serialization(self): 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_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 @@ -82352,20 +78675,14 @@ def test_vpn_server_route_health_reason_serialization(self): 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['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_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 @@ -82389,26 +78706,16 @@ 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['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 @@ -82466,60 +78773,42 @@ def test_virtual_network_interface_serialization(self): reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.0.1.5' reserved_ip_reference_model['deleted'] = deleted_model - reserved_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - ) + reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/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['name'] = 'my-reserved-ip-z1' 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['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'Default' 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_reference_model['deleted'] = 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['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_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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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_target_model = {} # VirtualNetworkInterfaceTargetShareMountTargetReference virtual_network_interface_target_model['deleted'] = deleted_model - virtual_network_interface_target_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c' - ) + virtual_network_interface_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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' 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'] = 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' @@ -82533,13 +78822,9 @@ def test_virtual_network_interface_serialization(self): 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) + virtual_network_interface_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' 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/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) + virtual_network_interface_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' virtual_network_interface_model_json['id'] = '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' virtual_network_interface_model_json['ips'] = [reserved_ip_reference_model] virtual_network_interface_model_json['lifecycle_state'] = 'stable' @@ -82560,9 +78845,7 @@ def test_virtual_network_interface_serialization(self): 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_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 @@ -82594,60 +78877,42 @@ def test_virtual_network_interface_collection_serialization(self): reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.0.1.5' reserved_ip_reference_model['deleted'] = deleted_model - reserved_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - ) + reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/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['name'] = 'my-reserved-ip-z1' 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['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' resource_group_reference_model['name'] = 'Default' 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_reference_model['deleted'] = 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['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_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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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_target_model = {} # VirtualNetworkInterfaceTargetShareMountTargetReference virtual_network_interface_target_model['deleted'] = deleted_model - virtual_network_interface_target_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/mount_targets/4cf9171a-0043-4434-8727-15b53dbc374c' - ) + virtual_network_interface_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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' 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'] = 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' @@ -82660,13 +78925,9 @@ def test_virtual_network_interface_collection_serialization(self): virtual_network_interface_model['allow_ip_spoofing'] = False virtual_network_interface_model['auto_delete'] = True virtual_network_interface_model['created_at'] = '2024-10-15T03:24:32.993000Z' - virtual_network_interface_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) + virtual_network_interface_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' virtual_network_interface_model['enable_infrastructure_nat'] = False - virtual_network_interface_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) + virtual_network_interface_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' virtual_network_interface_model['id'] = '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' virtual_network_interface_model['ips'] = [reserved_ip_reference_model] virtual_network_interface_model['lifecycle_state'] = 'stable' @@ -82688,23 +78949,15 @@ def test_virtual_network_interface_collection_serialization(self): virtual_network_interface_collection_model_json['limit'] = 20 virtual_network_interface_collection_model_json['next'] = page_link_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 @@ -82733,18 +78986,12 @@ def test_virtual_network_interface_patch_serialization(self): 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 @@ -82766,52 +79013,26 @@ def test_virtual_network_interface_reference_attachment_context_serialization(se # 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) - virtual_network_interface_reference_attachment_context_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) - virtual_network_interface_reference_attachment_context_model_json['id'] = ( - '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) + virtual_network_interface_reference_attachment_context_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + virtual_network_interface_reference_attachment_context_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + virtual_network_interface_reference_attachment_context_model_json['id'] = '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' 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 - ) + 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() - ) - assert ( - virtual_network_interface_reference_attachment_context_model_json2 - == virtual_network_interface_reference_attachment_context_model_json - ) + 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 class TestModel_Volume: @@ -82830,33 +79051,23 @@ def test_volume_serialization(self): 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['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'] = 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' - ) + 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 @@ -82875,9 +79086,7 @@ def test_volume_serialization(self): volume_profile_reference_model['name'] = 'custom' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = ( - 'https://resource-controller.cloud.ibm.com/v2/resource_groups/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' @@ -82894,13 +79103,9 @@ 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'] = deleted_model - image_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/images/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 @@ -82911,13 +79116,9 @@ def test_volume_serialization(self): 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'] = deleted_model - snapshot_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/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 @@ -82926,21 +79127,15 @@ 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_device_model = {} # VolumeAttachmentDevice volume_attachment_device_model['id'] = 'testString' instance_reference_model = {} # InstanceReference - instance_reference_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + instance_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' instance_reference_model['deleted'] = deleted_model - instance_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + instance_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' instance_reference_model['id'] = '0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' instance_reference_model['name'] = 'my-instance' @@ -82948,9 +79143,7 @@ def test_volume_serialization(self): volume_attachment_reference_volume_context_model['delete_volume_on_instance_delete'] = False volume_attachment_reference_volume_context_model['deleted'] = 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' - ) + volume_attachment_reference_volume_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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' @@ -82966,21 +79159,17 @@ def test_volume_serialization(self): volume_model_json['adjustable_capacity_states'] = ['attached', 'unattached'] volume_model_json['adjustable_iops_states'] = ['attached', 'unattached'] volume_model_json['attachment_state'] = 'attached' - volume_model_json['bandwidth'] = 1000 + volume_model_json['bandwidth'] = 100 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' @@ -83031,13 +79220,9 @@ def test_volume_attachment_serialization(self): 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['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'] = 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['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' @@ -83048,9 +79233,7 @@ 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' - ) + volume_attachment_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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' @@ -83092,13 +79275,9 @@ def test_volume_attachment_collection_serialization(self): 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-89b05e9a-e635-9464-9747-7ae3f9b03303' - ) + volume_reference_volume_attachment_context_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::volume:r006-89b05e9a-e635-9464-9747-7ae3f9b03303' volume_reference_volume_attachment_context_model['deleted'] = deleted_model - volume_reference_volume_attachment_context_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-89b05e9a-e635-9464-9747-7ae3f9b03303' - ) + volume_reference_volume_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-89b05e9a-e635-9464-9747-7ae3f9b03303' volume_reference_volume_attachment_context_model['id'] = 'r006-89b05e9a-e635-9464-9747-7ae3f9b03303' volume_reference_volume_attachment_context_model['name'] = 'my-boot-volume' volume_reference_volume_attachment_context_model['resource_type'] = 'volume' @@ -83108,9 +79287,7 @@ def test_volume_attachment_collection_serialization(self): volume_attachment_model['created_at'] = '2024-10-24T16:32:05Z' volume_attachment_model['delete_volume_on_instance_delete'] = True volume_attachment_model['device'] = volume_attachment_device_model - volume_attachment_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-fdb3642d-c849-4c29-97a9-03b868616f88' - ) + volume_attachment_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-fdb3642d-c849-4c29-97a9-03b868616f88' volume_attachment_model['id'] = '0717-fdb3642d-c849-4c29-97a9-03b868616f88' volume_attachment_model['name'] = 'my-boot-volume-attachment' volume_attachment_model['status'] = 'attached' @@ -83122,15 +79299,11 @@ def test_volume_attachment_collection_serialization(self): 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_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 @@ -83160,9 +79333,7 @@ def test_volume_attachment_device_serialization(self): 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_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 @@ -83193,9 +79364,7 @@ def test_volume_attachment_patch_serialization(self): 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_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 @@ -83232,9 +79401,7 @@ def test_volume_attachment_prototype_serialization(self): 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_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 @@ -83258,9 +79425,7 @@ 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' @@ -83281,42 +79446,22 @@ def test_volume_attachment_prototype_instance_by_image_context_serialization(sel 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['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 - ) + 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() - ) - assert ( - volume_attachment_prototype_instance_by_image_context_model_json2 - == volume_attachment_prototype_instance_by_image_context_model_json - ) + 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 class TestModel_VolumeAttachmentPrototypeInstanceBySourceSnapshotContext: @@ -83332,9 +79477,7 @@ 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' @@ -83345,9 +79488,7 @@ def test_volume_attachment_prototype_instance_by_source_snapshot_context_seriali snapshot_identity_model = {} # SnapshotIdentityById snapshot_identity_model['id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' - volume_prototype_instance_by_source_snapshot_context_model = ( - {} - ) # VolumePrototypeInstanceBySourceSnapshotContext + 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 @@ -83359,48 +79500,24 @@ def test_volume_attachment_prototype_instance_by_source_snapshot_context_seriali # 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['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['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 - ) + 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() - ) - assert ( - volume_attachment_prototype_instance_by_source_snapshot_context_model_json2 - == volume_attachment_prototype_instance_by_source_snapshot_context_model_json - ) + 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 class TestModel_VolumeAttachmentPrototypeInstanceByVolumeContext: @@ -83425,39 +79542,19 @@ def test_volume_attachment_prototype_instance_by_volume_context_serialization(se 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 - ) + 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() - ) - assert ( - volume_attachment_prototype_instance_by_volume_context_model_json2 - == volume_attachment_prototype_instance_by_volume_context_model_json - ) + 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 class TestModel_VolumeAttachmentReferenceInstanceContext: @@ -83479,13 +79576,9 @@ def test_volume_attachment_reference_instance_context_serialization(self): volume_attachment_device_model['id'] = '0717-80b3e36e-41f4-40e9-bd56-beae81792a68-679qb' 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['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'] = 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['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' @@ -83494,40 +79587,25 @@ def test_volume_attachment_reference_instance_context_serialization(self): volume_attachment_reference_instance_context_model_json = {} volume_attachment_reference_instance_context_model_json['deleted'] = 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' - ) + volume_attachment_reference_instance_context_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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['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() - ) - assert ( - volume_attachment_reference_instance_context_model_json2 - == volume_attachment_reference_instance_context_model_json - ) + 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 class TestModel_VolumeAttachmentReferenceVolumeContext: @@ -83549,13 +79627,9 @@ def test_volume_attachment_reference_volume_context_serialization(self): volume_attachment_device_model['id'] = 'testString' instance_reference_model = {} # InstanceReference - instance_reference_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + instance_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' instance_reference_model['deleted'] = deleted_model - instance_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + instance_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' instance_reference_model['id'] = '0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' instance_reference_model['name'] = 'my-instance' @@ -83564,39 +79638,26 @@ def test_volume_attachment_reference_volume_context_serialization(self): volume_attachment_reference_volume_context_model_json['delete_volume_on_instance_delete'] = True volume_attachment_reference_volume_context_model_json['deleted'] = 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' - ) + volume_attachment_reference_volume_context_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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() - ) - assert ( - volume_attachment_reference_volume_context_model_json2 - == volume_attachment_reference_volume_context_model_json - ) + 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 class TestModel_VolumeCatalogOffering: @@ -83615,15 +79676,11 @@ def test_volume_catalog_offering_serialization(self): 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['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'] = 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' - ) + 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 = {} @@ -83635,9 +79692,7 @@ def test_volume_catalog_offering_serialization(self): 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_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 @@ -83667,33 +79722,23 @@ def test_volume_collection_serialization(self): 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['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'] = 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' - ) + 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 @@ -83712,9 +79757,7 @@ def test_volume_collection_serialization(self): volume_profile_reference_model['name'] = 'custom' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = ( - 'https://resource-controller.cloud.ibm.com/v2/resource_groups/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' @@ -83731,13 +79774,9 @@ 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'] = deleted_model - image_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/images/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 @@ -83748,13 +79787,9 @@ def test_volume_collection_serialization(self): 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'] = deleted_model - snapshot_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/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 @@ -83763,21 +79798,15 @@ 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_device_model = {} # VolumeAttachmentDevice volume_attachment_device_model['id'] = 'testString' instance_reference_model = {} # InstanceReference - instance_reference_model['crn'] = ( - 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + instance_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' instance_reference_model['deleted'] = deleted_model - instance_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + instance_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' instance_reference_model['id'] = '0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' instance_reference_model['name'] = 'my-instance' @@ -83785,9 +79814,7 @@ def test_volume_collection_serialization(self): volume_attachment_reference_volume_context_model['delete_volume_on_instance_delete'] = False volume_attachment_reference_volume_context_model['deleted'] = 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/0717-82cbf856-9cbb-45fb-b62f-d7bcef32399a' - ) + volume_attachment_reference_volume_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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' @@ -83807,16 +79834,12 @@ def test_volume_collection_serialization(self): volume_model['capacity'] = 100 volume_model['catalog_offering'] = volume_catalog_offering_model volume_model['created_at'] = '2024-10-07T23:16:53Z' - 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'] = 'user_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'] = 1000 volume_model['name'] = 'my-volume' @@ -83869,12 +79892,8 @@ 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) @@ -84015,30 +80034,19 @@ def test_volume_profile_adjustable_capacity_states_serialization(self): volume_profile_adjustable_capacity_states_model_json['values'] = ['attached', 'unattached'] # Construct a model instance of VolumeProfileAdjustableCapacityStates by calling from_dict on the json representation - volume_profile_adjustable_capacity_states_model = VolumeProfileAdjustableCapacityStates.from_dict( - volume_profile_adjustable_capacity_states_model_json - ) + volume_profile_adjustable_capacity_states_model = VolumeProfileAdjustableCapacityStates.from_dict(volume_profile_adjustable_capacity_states_model_json) assert volume_profile_adjustable_capacity_states_model != False # Construct a model instance of VolumeProfileAdjustableCapacityStates by calling from_dict on the json representation - volume_profile_adjustable_capacity_states_model_dict = VolumeProfileAdjustableCapacityStates.from_dict( - volume_profile_adjustable_capacity_states_model_json - ).__dict__ - volume_profile_adjustable_capacity_states_model2 = VolumeProfileAdjustableCapacityStates( - **volume_profile_adjustable_capacity_states_model_dict - ) + volume_profile_adjustable_capacity_states_model_dict = VolumeProfileAdjustableCapacityStates.from_dict(volume_profile_adjustable_capacity_states_model_json).__dict__ + volume_profile_adjustable_capacity_states_model2 = VolumeProfileAdjustableCapacityStates(**volume_profile_adjustable_capacity_states_model_dict) # Verify the model instances are equivalent assert volume_profile_adjustable_capacity_states_model == volume_profile_adjustable_capacity_states_model2 # Convert model instance back to dict and verify no loss of data - volume_profile_adjustable_capacity_states_model_json2 = ( - volume_profile_adjustable_capacity_states_model.to_dict() - ) - assert ( - volume_profile_adjustable_capacity_states_model_json2 - == volume_profile_adjustable_capacity_states_model_json - ) + volume_profile_adjustable_capacity_states_model_json2 = volume_profile_adjustable_capacity_states_model.to_dict() + assert volume_profile_adjustable_capacity_states_model_json2 == volume_profile_adjustable_capacity_states_model_json class TestModel_VolumeProfileAdjustableIOPSStates: @@ -84057,18 +80065,12 @@ def test_volume_profile_adjustable_iops_states_serialization(self): volume_profile_adjustable_iops_states_model_json['values'] = ['attached', 'unattached'] # Construct a model instance of VolumeProfileAdjustableIOPSStates by calling from_dict on the json representation - volume_profile_adjustable_iops_states_model = VolumeProfileAdjustableIOPSStates.from_dict( - volume_profile_adjustable_iops_states_model_json - ) + volume_profile_adjustable_iops_states_model = VolumeProfileAdjustableIOPSStates.from_dict(volume_profile_adjustable_iops_states_model_json) assert volume_profile_adjustable_iops_states_model != False # Construct a model instance of VolumeProfileAdjustableIOPSStates by calling from_dict on the json representation - volume_profile_adjustable_iops_states_model_dict = VolumeProfileAdjustableIOPSStates.from_dict( - volume_profile_adjustable_iops_states_model_json - ).__dict__ - volume_profile_adjustable_iops_states_model2 = VolumeProfileAdjustableIOPSStates( - **volume_profile_adjustable_iops_states_model_dict - ) + volume_profile_adjustable_iops_states_model_dict = VolumeProfileAdjustableIOPSStates.from_dict(volume_profile_adjustable_iops_states_model_json).__dict__ + volume_profile_adjustable_iops_states_model2 = VolumeProfileAdjustableIOPSStates(**volume_profile_adjustable_iops_states_model_dict) # Verify the model instances are equivalent assert volume_profile_adjustable_iops_states_model == volume_profile_adjustable_iops_states_model2 @@ -84145,9 +80147,7 @@ def test_volume_profile_collection_serialization(self): 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_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 @@ -84170,9 +80170,7 @@ 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 @@ -84180,9 +80178,7 @@ def test_volume_profile_reference_serialization(self): 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_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 @@ -84206,9 +80202,7 @@ 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' @@ -84227,30 +80221,19 @@ def test_volume_prototype_instance_by_image_context_serialization(self): 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() - ) - assert ( - volume_prototype_instance_by_image_context_model_json2 - == volume_prototype_instance_by_image_context_model_json - ) + 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 class TestModel_VolumePrototypeInstanceBySourceSnapshotContext: @@ -84266,9 +80249,7 @@ 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' @@ -84282,50 +80263,28 @@ 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['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['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 - ) + 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() - ) - assert ( - volume_prototype_instance_by_source_snapshot_context_model_json2 - == volume_prototype_instance_by_source_snapshot_context_model_json - ) + 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 class TestModel_VolumeReference: @@ -84352,13 +80311,9 @@ 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'] = 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['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 @@ -84397,42 +80352,27 @@ def test_volume_reference_volume_attachment_context_serialization(self): # 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['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'] = 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['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() - ) - assert ( - volume_reference_volume_attachment_context_model_json2 - == volume_reference_volume_attachment_context_model_json - ) + 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 class TestModel_VolumeRemote: @@ -84485,9 +80425,7 @@ 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) @@ -84668,41 +80606,79 @@ def test_backup_policy_job_source_instance_reference_serialization(self): # 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + backup_policy_job_source_instance_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' backup_policy_job_source_instance_reference_model_json['deleted'] = deleted_model - backup_policy_job_source_instance_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + backup_policy_job_source_instance_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' backup_policy_job_source_instance_reference_model_json['id'] = '0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' 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() - ) - assert ( - backup_policy_job_source_instance_reference_model_json2 - == backup_policy_job_source_instance_reference_model_json - ) + 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 + + +class TestModel_BackupPolicyJobSourceShareReference: + """ + Test Class for BackupPolicyJobSourceShareReference + """ + + def test_backup_policy_job_source_share_reference_serialization(self): + """ + Test serialization/deserialization for BackupPolicyJobSourceShareReference + """ + + # Construct dict forms of any model objects needed in order to build this model. + + deleted_model = {} # Deleted + 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 BackupPolicyJobSourceShareReference model + backup_policy_job_source_share_reference_model_json = {} + backup_policy_job_source_share_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58' + backup_policy_job_source_share_reference_model_json['deleted'] = deleted_model + backup_policy_job_source_share_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58' + backup_policy_job_source_share_reference_model_json['id'] = '0fe9e5d8-0a4d-4818-96ec-e99708644a58' + backup_policy_job_source_share_reference_model_json['name'] = 'my-share' + backup_policy_job_source_share_reference_model_json['remote'] = share_remote_model + backup_policy_job_source_share_reference_model_json['resource_type'] = 'share' + + # Construct a model instance of BackupPolicyJobSourceShareReference by calling from_dict on the json representation + backup_policy_job_source_share_reference_model = BackupPolicyJobSourceShareReference.from_dict(backup_policy_job_source_share_reference_model_json) + assert backup_policy_job_source_share_reference_model != False + + # Construct a model instance of BackupPolicyJobSourceShareReference by calling from_dict on the json representation + backup_policy_job_source_share_reference_model_dict = BackupPolicyJobSourceShareReference.from_dict(backup_policy_job_source_share_reference_model_json).__dict__ + backup_policy_job_source_share_reference_model2 = BackupPolicyJobSourceShareReference(**backup_policy_job_source_share_reference_model_dict) + + # Verify the model instances are equivalent + assert backup_policy_job_source_share_reference_model == backup_policy_job_source_share_reference_model2 + + # Convert model instance back to dict and verify no loss of data + backup_policy_job_source_share_reference_model_json2 = backup_policy_job_source_share_reference_model.to_dict() + assert backup_policy_job_source_share_reference_model_json2 == backup_policy_job_source_share_reference_model_json class TestModel_BackupPolicyJobSourceVolumeReference: @@ -84729,43 +80705,28 @@ 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['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'] = 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['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() - ) - assert ( - backup_policy_job_source_volume_reference_model_json2 - == backup_policy_job_source_volume_reference_model_json - ) + 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 class TestModel_BackupPolicyMatchResourceTypeInstance: @@ -84783,9 +80744,7 @@ def test_backup_policy_match_resource_type_instance_serialization(self): 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_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui' deleted_model = {} # Deleted deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' @@ -84799,40 +80758,30 @@ def test_backup_policy_match_resource_type_instance_serialization(self): backup_policy_plan_reference_model = {} # BackupPolicyPlanReference backup_policy_plan_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model['id'] = 'r006-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' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = ( - 'https://resource-controller.cloud.ibm.com/v2/resource_groups/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'] = 'ebc2b430240943458b9e91e1432cfcce' 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6' + backup_policy_match_resource_type_instance_model_json['id'] = 'r006-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'] @@ -84845,30 +80794,98 @@ def test_backup_policy_match_resource_type_instance_serialization(self): 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() - ) - assert ( - backup_policy_match_resource_type_instance_model_json2 - == backup_policy_match_resource_type_instance_model_json - ) + 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 + + +class TestModel_BackupPolicyMatchResourceTypeShare: + """ + Test Class for BackupPolicyMatchResourceTypeShare + """ + + def test_backup_policy_match_resource_type_share_serialization(self): + """ + Test serialization/deserialization for BackupPolicyMatchResourceTypeShare + """ + + # 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' + + deleted_model = {} # Deleted + 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['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'] = deleted_model + backup_policy_plan_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model['id'] = 'r006-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' + + 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' + + backup_policy_scope_model = {} # BackupPolicyScopeEnterpriseReference + backup_policy_scope_model['crn'] = 'crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce' + backup_policy_scope_model['id'] = 'ebc2b430240943458b9e91e1432cfcce' + backup_policy_scope_model['resource_type'] = 'enterprise' + + # Construct a json representation of a BackupPolicyMatchResourceTypeShare model + backup_policy_match_resource_type_share_model_json = {} + backup_policy_match_resource_type_share_model_json['created_at'] = '2019-01-01T12:00:00Z' + backup_policy_match_resource_type_share_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-076191ba-49c2-4763-94fd-c70de73ee2e6' + backup_policy_match_resource_type_share_model_json['health_reasons'] = [backup_policy_health_reason_model] + backup_policy_match_resource_type_share_model_json['health_state'] = 'ok' + backup_policy_match_resource_type_share_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6' + backup_policy_match_resource_type_share_model_json['id'] = 'r006-076191ba-49c2-4763-94fd-c70de73ee2e6' + backup_policy_match_resource_type_share_model_json['last_job_completed_at'] = '2019-01-01T12:00:00Z' + backup_policy_match_resource_type_share_model_json['lifecycle_state'] = 'stable' + backup_policy_match_resource_type_share_model_json['match_user_tags'] = ['my-daily-backup-policy'] + backup_policy_match_resource_type_share_model_json['name'] = 'my-backup-policy' + backup_policy_match_resource_type_share_model_json['plans'] = [backup_policy_plan_reference_model] + backup_policy_match_resource_type_share_model_json['resource_group'] = resource_group_reference_model + backup_policy_match_resource_type_share_model_json['resource_type'] = 'backup_policy' + backup_policy_match_resource_type_share_model_json['scope'] = backup_policy_scope_model + backup_policy_match_resource_type_share_model_json['match_resource_type'] = 'share' + + # Construct a model instance of BackupPolicyMatchResourceTypeShare by calling from_dict on the json representation + backup_policy_match_resource_type_share_model = BackupPolicyMatchResourceTypeShare.from_dict(backup_policy_match_resource_type_share_model_json) + assert backup_policy_match_resource_type_share_model != False + + # Construct a model instance of BackupPolicyMatchResourceTypeShare by calling from_dict on the json representation + backup_policy_match_resource_type_share_model_dict = BackupPolicyMatchResourceTypeShare.from_dict(backup_policy_match_resource_type_share_model_json).__dict__ + backup_policy_match_resource_type_share_model2 = BackupPolicyMatchResourceTypeShare(**backup_policy_match_resource_type_share_model_dict) + + # Verify the model instances are equivalent + assert backup_policy_match_resource_type_share_model == backup_policy_match_resource_type_share_model2 + + # Convert model instance back to dict and verify no loss of data + backup_policy_match_resource_type_share_model_json2 = backup_policy_match_resource_type_share_model.to_dict() + assert backup_policy_match_resource_type_share_model_json2 == backup_policy_match_resource_type_share_model_json class TestModel_BackupPolicyMatchResourceTypeVolume: @@ -84886,9 +80903,7 @@ def test_backup_policy_match_resource_type_volume_serialization(self): 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_health_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-backup-service-about&interface=ui' deleted_model = {} # Deleted deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' @@ -84902,40 +80917,30 @@ def test_backup_policy_match_resource_type_volume_serialization(self): backup_policy_plan_reference_model = {} # BackupPolicyPlanReference backup_policy_plan_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r006-6da51cfe-6f7b-4638-a6ba-00e9c327b178' + backup_policy_plan_reference_model['id'] = 'r006-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' resource_group_reference_model = {} # ResourceGroupReference - resource_group_reference_model['href'] = ( - 'https://resource-controller.cloud.ibm.com/v2/resource_groups/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'] = 'ebc2b430240943458b9e91e1432cfcce' 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::backup-policy:r006-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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r006-076191ba-49c2-4763-94fd-c70de73ee2e6' + backup_policy_match_resource_type_volume_model_json['id'] = 'r006-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'] @@ -84947,27 +80952,19 @@ def test_backup_policy_match_resource_type_volume_serialization(self): 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() - assert ( - backup_policy_match_resource_type_volume_model_json2 == backup_policy_match_resource_type_volume_model_json - ) + assert backup_policy_match_resource_type_volume_model_json2 == backup_policy_match_resource_type_volume_model_json class TestModel_BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype: @@ -84994,9 +80991,7 @@ def test_backup_policy_prototype_backup_policy_match_resource_type_instance_prot 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' @@ -85014,77 +81009,113 @@ def test_backup_policy_prototype_backup_policy_match_resource_type_instance_prot 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['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['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 - ) + 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() - ) - 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 - ) + 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 + + +class TestModel_BackupPolicyPrototypeBackupPolicyMatchResourceTypeSharePrototype: + """ + Test Class for BackupPolicyPrototypeBackupPolicyMatchResourceTypeSharePrototype + """ + + def test_backup_policy_prototype_backup_policy_match_resource_type_share_prototype_serialization(self): + """ + Test serialization/deserialization for BackupPolicyPrototypeBackupPolicyMatchResourceTypeSharePrototype + """ + + # Construct dict forms of any model objects needed in order to build this model. + + 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['max_snapshots'] = 5 + 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['delete_after'] = 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' + + 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_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['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['name'] = 'my-policy-plan' + 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' + + # Construct a json representation of a BackupPolicyPrototypeBackupPolicyMatchResourceTypeSharePrototype model + backup_policy_prototype_backup_policy_match_resource_type_share_prototype_model_json = {} + backup_policy_prototype_backup_policy_match_resource_type_share_prototype_model_json['match_user_tags'] = ['my-daily-backup-policy'] + backup_policy_prototype_backup_policy_match_resource_type_share_prototype_model_json['name'] = 'my-backup-policy' + backup_policy_prototype_backup_policy_match_resource_type_share_prototype_model_json['plans'] = [backup_policy_plan_prototype_model] + backup_policy_prototype_backup_policy_match_resource_type_share_prototype_model_json['resource_group'] = resource_group_identity_model + backup_policy_prototype_backup_policy_match_resource_type_share_prototype_model_json['scope'] = backup_policy_scope_prototype_model + backup_policy_prototype_backup_policy_match_resource_type_share_prototype_model_json['match_resource_type'] = 'share' + + # Construct a model instance of BackupPolicyPrototypeBackupPolicyMatchResourceTypeSharePrototype by calling from_dict on the json representation + backup_policy_prototype_backup_policy_match_resource_type_share_prototype_model = BackupPolicyPrototypeBackupPolicyMatchResourceTypeSharePrototype.from_dict(backup_policy_prototype_backup_policy_match_resource_type_share_prototype_model_json) + assert backup_policy_prototype_backup_policy_match_resource_type_share_prototype_model != False + + # Construct a model instance of BackupPolicyPrototypeBackupPolicyMatchResourceTypeSharePrototype by calling from_dict on the json representation + backup_policy_prototype_backup_policy_match_resource_type_share_prototype_model_dict = BackupPolicyPrototypeBackupPolicyMatchResourceTypeSharePrototype.from_dict(backup_policy_prototype_backup_policy_match_resource_type_share_prototype_model_json).__dict__ + backup_policy_prototype_backup_policy_match_resource_type_share_prototype_model2 = BackupPolicyPrototypeBackupPolicyMatchResourceTypeSharePrototype(**backup_policy_prototype_backup_policy_match_resource_type_share_prototype_model_dict) + + # Verify the model instances are equivalent + assert backup_policy_prototype_backup_policy_match_resource_type_share_prototype_model == backup_policy_prototype_backup_policy_match_resource_type_share_prototype_model2 + + # Convert model instance back to dict and verify no loss of data + backup_policy_prototype_backup_policy_match_resource_type_share_prototype_model_json2 = backup_policy_prototype_backup_policy_match_resource_type_share_prototype_model.to_dict() + assert backup_policy_prototype_backup_policy_match_resource_type_share_prototype_model_json2 == backup_policy_prototype_backup_policy_match_resource_type_share_prototype_model_json class TestModel_BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype: @@ -85111,9 +81142,7 @@ def test_backup_policy_prototype_backup_policy_match_resource_type_volume_protot 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' @@ -85131,73 +81160,37 @@ def test_backup_policy_prototype_backup_policy_match_resource_type_volume_protot 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['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['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 - ) + 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() - ) - 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 - ) + 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 class TestModel_BackupPolicyScopeAccountReference: @@ -85216,18 +81209,12 @@ def test_backup_policy_scope_account_reference_serialization(self): 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 @@ -85249,34 +81236,117 @@ 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['crn'] = 'crn:v1:bluemix:public:enterprise::a/aa2432b1fa4d4ace891e9b80fc104e34::enterprise:ebc2b430240943458b9e91e1432cfcce' backup_policy_scope_enterprise_reference_model_json['id'] = 'ebc2b430240943458b9e91e1432cfcce' 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() - assert ( - backup_policy_scope_enterprise_reference_model_json2 == backup_policy_scope_enterprise_reference_model_json - ) + assert backup_policy_scope_enterprise_reference_model_json2 == backup_policy_scope_enterprise_reference_model_json + + +class TestModel_BackupPolicyTargetSnapshotShareSnapshotReference: + """ + Test Class for BackupPolicyTargetSnapshotShareSnapshotReference + """ + + def test_backup_policy_target_snapshot_share_snapshot_reference_serialization(self): + """ + Test serialization/deserialization for BackupPolicyTargetSnapshotShareSnapshotReference + """ + + # Construct dict forms of any model objects needed in order to build this model. + + deleted_model = {} # Deleted + deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + # Construct a json representation of a BackupPolicyTargetSnapshotShareSnapshotReference model + backup_policy_target_snapshot_share_snapshot_reference_model_json = {} + backup_policy_target_snapshot_share_snapshot_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4' + backup_policy_target_snapshot_share_snapshot_reference_model_json['deleted'] = deleted_model + backup_policy_target_snapshot_share_snapshot_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4' + backup_policy_target_snapshot_share_snapshot_reference_model_json['id'] = 'r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4' + backup_policy_target_snapshot_share_snapshot_reference_model_json['name'] = 'my-share-snapshot' + backup_policy_target_snapshot_share_snapshot_reference_model_json['resource_type'] = 'share_snapshot' + + # Construct a model instance of BackupPolicyTargetSnapshotShareSnapshotReference by calling from_dict on the json representation + backup_policy_target_snapshot_share_snapshot_reference_model = BackupPolicyTargetSnapshotShareSnapshotReference.from_dict(backup_policy_target_snapshot_share_snapshot_reference_model_json) + assert backup_policy_target_snapshot_share_snapshot_reference_model != False + + # Construct a model instance of BackupPolicyTargetSnapshotShareSnapshotReference by calling from_dict on the json representation + backup_policy_target_snapshot_share_snapshot_reference_model_dict = BackupPolicyTargetSnapshotShareSnapshotReference.from_dict(backup_policy_target_snapshot_share_snapshot_reference_model_json).__dict__ + backup_policy_target_snapshot_share_snapshot_reference_model2 = BackupPolicyTargetSnapshotShareSnapshotReference(**backup_policy_target_snapshot_share_snapshot_reference_model_dict) + + # Verify the model instances are equivalent + assert backup_policy_target_snapshot_share_snapshot_reference_model == backup_policy_target_snapshot_share_snapshot_reference_model2 + + # Convert model instance back to dict and verify no loss of data + backup_policy_target_snapshot_share_snapshot_reference_model_json2 = backup_policy_target_snapshot_share_snapshot_reference_model.to_dict() + assert backup_policy_target_snapshot_share_snapshot_reference_model_json2 == backup_policy_target_snapshot_share_snapshot_reference_model_json + + +class TestModel_BackupPolicyTargetSnapshotSnapshotReference: + """ + Test Class for BackupPolicyTargetSnapshotSnapshotReference + """ + + def test_backup_policy_target_snapshot_snapshot_reference_serialization(self): + """ + Test serialization/deserialization for BackupPolicyTargetSnapshotSnapshotReference + """ + + # Construct dict forms of any model objects needed in order to build this model. + + deleted_model = {} # Deleted + 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' + + snapshot_remote_model = {} # SnapshotRemote + snapshot_remote_model['account'] = account_reference_model + snapshot_remote_model['region'] = region_reference_model + + # Construct a json representation of a BackupPolicyTargetSnapshotSnapshotReference model + backup_policy_target_snapshot_snapshot_reference_model_json = {} + backup_policy_target_snapshot_snapshot_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + backup_policy_target_snapshot_snapshot_reference_model_json['deleted'] = deleted_model + backup_policy_target_snapshot_snapshot_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + backup_policy_target_snapshot_snapshot_reference_model_json['id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' + backup_policy_target_snapshot_snapshot_reference_model_json['name'] = 'my-snapshot' + backup_policy_target_snapshot_snapshot_reference_model_json['remote'] = snapshot_remote_model + backup_policy_target_snapshot_snapshot_reference_model_json['resource_type'] = 'snapshot' + + # Construct a model instance of BackupPolicyTargetSnapshotSnapshotReference by calling from_dict on the json representation + backup_policy_target_snapshot_snapshot_reference_model = BackupPolicyTargetSnapshotSnapshotReference.from_dict(backup_policy_target_snapshot_snapshot_reference_model_json) + assert backup_policy_target_snapshot_snapshot_reference_model != False + + # Construct a model instance of BackupPolicyTargetSnapshotSnapshotReference by calling from_dict on the json representation + backup_policy_target_snapshot_snapshot_reference_model_dict = BackupPolicyTargetSnapshotSnapshotReference.from_dict(backup_policy_target_snapshot_snapshot_reference_model_json).__dict__ + backup_policy_target_snapshot_snapshot_reference_model2 = BackupPolicyTargetSnapshotSnapshotReference(**backup_policy_target_snapshot_snapshot_reference_model_dict) + + # Verify the model instances are equivalent + assert backup_policy_target_snapshot_snapshot_reference_model == backup_policy_target_snapshot_snapshot_reference_model2 + + # Convert model instance back to dict and verify no loss of data + backup_policy_target_snapshot_snapshot_reference_model_json2 = backup_policy_target_snapshot_snapshot_reference_model.to_dict() + assert backup_policy_target_snapshot_snapshot_reference_model_json2 == backup_policy_target_snapshot_snapshot_reference_model_json class TestModel_BareMetalServerBootTargetBareMetalServerDiskReference: @@ -85297,51 +81367,25 @@ def test_bare_metal_server_boot_target_bare_metal_server_disk_reference_serializ # 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'] = 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/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96' - ) - 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/disks/0717-3744f199-6ccc-4698-8772-bb3937348c96' + 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['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 - ) + 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() - ) - 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 - ) + 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 class TestModel_BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount: @@ -85349,9 +81393,7 @@ 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 """ @@ -85362,63 +81404,34 @@ def test_bare_metal_server_initialization_user_account_bare_metal_server_initial 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:r006-82679077-ac3b-4c10-be16-63e9c21f0f45' - ) + key_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45' key_reference_model['deleted'] = deleted_model key_reference_model['fingerprint'] = 'SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY' - key_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45' - ) + key_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45' key_reference_model['id'] = 'r006-82679077-ac3b-4c10-be16-63e9c21f0f45' key_reference_model['name'] = 'my-key-1' # 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 - ) - assert ( - bare_metal_server_initialization_user_account_bare_metal_server_initialization_host_user_account_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_BareMetalServerNetworkAttachmentByPCI: @@ -85439,34 +81452,22 @@ def test_bare_metal_server_network_attachment_by_pci_serialization(self): reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' reserved_ip_reference_model['deleted'] = 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['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_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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) - virtual_network_interface_reference_attachment_context_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) + 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + virtual_network_interface_reference_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' virtual_network_interface_reference_attachment_context_model['id'] = '0717-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' @@ -85474,9 +81475,7 @@ def test_bare_metal_server_network_attachment_by_pci_serialization(self): # 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/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - ) + bare_metal_server_network_attachment_by_pci_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' bare_metal_server_network_attachment_by_pci_model_json['id'] = '0717-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' @@ -85485,37 +81484,24 @@ def test_bare_metal_server_network_attachment_by_pci_serialization(self): 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['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() - ) - assert ( - bare_metal_server_network_attachment_by_pci_model_json2 - == bare_metal_server_network_attachment_by_pci_model_json - ) + 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 class TestModel_BareMetalServerNetworkAttachmentByVLAN: @@ -85536,34 +81522,22 @@ def test_bare_metal_server_network_attachment_by_vlan_serialization(self): reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' reserved_ip_reference_model['deleted'] = 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['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_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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) - virtual_network_interface_reference_attachment_context_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) + 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + virtual_network_interface_reference_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' virtual_network_interface_reference_attachment_context_model['id'] = '0717-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' @@ -85571,51 +81545,34 @@ def test_bare_metal_server_network_attachment_by_vlan_serialization(self): # 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/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - ) + bare_metal_server_network_attachment_by_vlan_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' bare_metal_server_network_attachment_by_vlan_model_json['id'] = '0717-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['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['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() - ) - assert ( - bare_metal_server_network_attachment_by_vlan_model_json2 - == bare_metal_server_network_attachment_by_vlan_model_json - ) + 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 class TestModel_BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeBareMetalServerNetworkAttachmentContext: @@ -85623,25 +81580,19 @@ 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 = {} # 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' @@ -85656,75 +81607,32 @@ def test_bare_metal_server_network_attachment_prototype_virtual_network_interfac 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[ - '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 + 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['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 - ) - assert ( - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_bare_metal_server_network_attachment_context_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByPCIPrototype: @@ -85732,25 +81640,19 @@ 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 = {} # 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' @@ -85764,82 +81666,39 @@ def test_bare_metal_server_network_attachment_prototype_bare_metal_server_networ 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 = {} # 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['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 = {} + 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 - ) - assert ( - bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_pci_prototype_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_BareMetalServerNetworkAttachmentPrototypeBareMetalServerNetworkAttachmentByVLANPrototype: @@ -85847,25 +81706,19 @@ 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 = {} # 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' @@ -85879,85 +81732,40 @@ def test_bare_metal_server_network_attachment_prototype_bare_metal_server_networ 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 = {} # 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['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 = {} + 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 - ) - assert ( - bare_metal_server_network_attachment_prototype_bare_metal_server_network_attachment_by_vlan_prototype_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_BareMetalServerNetworkInterfaceByHiperSocket: @@ -85977,45 +81785,31 @@ def test_bare_metal_server_network_interface_by_hiper_socket_serialization(self) 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:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) + floating_ip_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' floating_ip_reference_model['deleted'] = deleted_model - floating_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) + floating_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' floating_ip_reference_model['id'] = 'r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' floating_ip_reference_model['name'] = 'my-floating-ip' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' reserved_ip_reference_model['deleted'] = 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['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_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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_reference_model['deleted'] = 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['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_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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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' @@ -86026,59 +81820,33 @@ def test_bare_metal_server_network_interface_by_hiper_socket_serialization(self) 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/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - ) - bare_metal_server_network_interface_by_hiper_socket_model_json['id'] = ( - '0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - ) + bare_metal_server_network_interface_by_hiper_socket_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' + bare_metal_server_network_interface_by_hiper_socket_model_json['id'] = '0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' 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['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['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 - ) + 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() - ) - assert ( - bare_metal_server_network_interface_by_hiper_socket_model_json2 - == bare_metal_server_network_interface_by_hiper_socket_model_json - ) + 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 class TestModel_BareMetalServerNetworkInterfaceByPCI: @@ -86098,45 +81866,31 @@ def test_bare_metal_server_network_interface_by_pci_serialization(self): 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:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) + floating_ip_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' floating_ip_reference_model['deleted'] = deleted_model - floating_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) + floating_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' floating_ip_reference_model['id'] = 'r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' floating_ip_reference_model['name'] = 'my-floating-ip' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' reserved_ip_reference_model['deleted'] = 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['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_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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_reference_model['deleted'] = 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['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_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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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' @@ -86147,9 +81901,7 @@ def test_bare_metal_server_network_interface_by_pci_serialization(self): 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/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - ) + bare_metal_server_network_interface_by_pci_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' bare_metal_server_network_interface_by_pci_model_json['id'] = '0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' 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' @@ -86164,30 +81916,19 @@ def test_bare_metal_server_network_interface_by_pci_serialization(self): 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() - ) - assert ( - bare_metal_server_network_interface_by_pci_model_json2 - == bare_metal_server_network_interface_by_pci_model_json - ) + 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 class TestModel_BareMetalServerNetworkInterfaceByVLAN: @@ -86207,45 +81948,31 @@ def test_bare_metal_server_network_interface_by_vlan_serialization(self): 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:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) + floating_ip_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::floating-ip:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' floating_ip_reference_model['deleted'] = deleted_model - floating_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) + floating_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' floating_ip_reference_model['id'] = 'r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' floating_ip_reference_model['name'] = 'my-floating-ip' reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' reserved_ip_reference_model['deleted'] = 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['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_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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::security-group:r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271' security_group_reference_model['deleted'] = 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['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_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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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' @@ -86256,9 +81983,7 @@ def test_bare_metal_server_network_interface_by_vlan_serialization(self): 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/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - ) + bare_metal_server_network_interface_by_vlan_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' bare_metal_server_network_interface_by_vlan_model_json['id'] = '0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' 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' @@ -86274,30 +81999,19 @@ def test_bare_metal_server_network_interface_by_vlan_serialization(self): 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() - ) - assert ( - bare_metal_server_network_interface_by_vlan_model_json2 - == bare_metal_server_network_interface_by_vlan_model_json - ) + 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 class TestModel_BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype: @@ -86305,18 +82019,14 @@ 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' @@ -86328,64 +82038,29 @@ def test_bare_metal_server_network_interface_prototype_bare_metal_server_network 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 = {} + 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 - ) - assert ( - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_hiper_socket_prototype_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype: @@ -86393,18 +82068,14 @@ 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' @@ -86416,65 +82087,30 @@ def test_bare_metal_server_network_interface_prototype_bare_metal_server_network 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 = {} + 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 - ) - assert ( - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_pci_prototype_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype: @@ -86482,18 +82118,14 @@ 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' @@ -86505,68 +82137,31 @@ def test_bare_metal_server_network_interface_prototype_bare_metal_server_network 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 = {} + 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 - ) - assert ( - bare_metal_server_network_interface_prototype_bare_metal_server_network_interface_by_vlan_prototype_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_BareMetalServerPrimaryNetworkAttachmentPrototypeBareMetalServerPrimaryNetworkAttachmentByPCIPrototype: @@ -86574,25 +82169,19 @@ 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 = {} # 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' @@ -86606,82 +82195,39 @@ def test_bare_metal_server_primary_network_attachment_prototype_bare_metal_serve 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 = {} # 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['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 = {} + 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 - ) - assert ( - bare_metal_server_primary_network_attachment_prototype_bare_metal_server_primary_network_attachment_by_pci_prototype_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_BareMetalServerProfileBandwidthDependent: @@ -86699,32 +82245,19 @@ def test_bare_metal_server_profile_bandwidth_dependent_serialization(self): 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 - ) + 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() - ) - assert ( - bare_metal_server_profile_bandwidth_dependent_model_json2 - == bare_metal_server_profile_bandwidth_dependent_model_json - ) + 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 class TestModel_BareMetalServerProfileBandwidthEnum: @@ -86744,27 +82277,19 @@ def test_bare_metal_server_profile_bandwidth_enum_serialization(self): 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() - assert ( - bare_metal_server_profile_bandwidth_enum_model_json2 == bare_metal_server_profile_bandwidth_enum_model_json - ) + assert bare_metal_server_profile_bandwidth_enum_model_json2 == bare_metal_server_profile_bandwidth_enum_model_json class TestModel_BareMetalServerProfileBandwidthFixed: @@ -86783,30 +82308,19 @@ 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() - ) - assert ( - bare_metal_server_profile_bandwidth_fixed_model_json2 - == bare_metal_server_profile_bandwidth_fixed_model_json - ) + 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 class TestModel_BareMetalServerProfileBandwidthRange: @@ -86828,30 +82342,19 @@ 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() - ) - assert ( - bare_metal_server_profile_bandwidth_range_model_json2 - == bare_metal_server_profile_bandwidth_range_model_json - ) + 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 class TestModel_BareMetalServerProfileCPUCoreCountDependent: @@ -86869,37 +82372,19 @@ def test_bare_metal_server_profile_cpu_core_count_dependent_serialization(self): 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 - ) + 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() - ) - assert ( - bare_metal_server_profile_cpu_core_count_dependent_model_json2 - == bare_metal_server_profile_cpu_core_count_dependent_model_json - ) + 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 class TestModel_BareMetalServerProfileCPUCoreCountEnum: @@ -86919,32 +82404,19 @@ def test_bare_metal_server_profile_cpu_core_count_enum_serialization(self): 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 - ) + 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() - ) - assert ( - bare_metal_server_profile_cpu_core_count_enum_model_json2 - == bare_metal_server_profile_cpu_core_count_enum_model_json - ) + 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 class TestModel_BareMetalServerProfileCPUCoreCountFixed: @@ -86963,33 +82435,19 @@ def test_bare_metal_server_profile_cpu_core_count_fixed_serialization(self): 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 - ) + 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() - ) - assert ( - bare_metal_server_profile_cpu_core_count_fixed_model_json2 - == bare_metal_server_profile_cpu_core_count_fixed_model_json - ) + 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 class TestModel_BareMetalServerProfileCPUCoreCountRange: @@ -87011,33 +82469,19 @@ def test_bare_metal_server_profile_cpu_core_count_range_serialization(self): 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 - ) + 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() - ) - assert ( - bare_metal_server_profile_cpu_core_count_range_model_json2 - == bare_metal_server_profile_cpu_core_count_range_model_json - ) + 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 class TestModel_BareMetalServerProfileCPUSocketCountDependent: @@ -87055,37 +82499,19 @@ def test_bare_metal_server_profile_cpu_socket_count_dependent_serialization(self 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 - ) + 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() - ) - assert ( - bare_metal_server_profile_cpu_socket_count_dependent_model_json2 - == bare_metal_server_profile_cpu_socket_count_dependent_model_json - ) + 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 class TestModel_BareMetalServerProfileCPUSocketCountEnum: @@ -87105,33 +82531,19 @@ def test_bare_metal_server_profile_cpu_socket_count_enum_serialization(self): 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 - ) + 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() - ) - assert ( - bare_metal_server_profile_cpu_socket_count_enum_model_json2 - == bare_metal_server_profile_cpu_socket_count_enum_model_json - ) + 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 class TestModel_BareMetalServerProfileCPUSocketCountFixed: @@ -87150,35 +82562,19 @@ def test_bare_metal_server_profile_cpu_socket_count_fixed_serialization(self): 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 - ) + 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() - ) - assert ( - bare_metal_server_profile_cpu_socket_count_fixed_model_json2 - == bare_metal_server_profile_cpu_socket_count_fixed_model_json - ) + 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 class TestModel_BareMetalServerProfileCPUSocketCountRange: @@ -87200,35 +82596,19 @@ def test_bare_metal_server_profile_cpu_socket_count_range_serialization(self): 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 - ) + 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() - ) - assert ( - bare_metal_server_profile_cpu_socket_count_range_model_json2 - == bare_metal_server_profile_cpu_socket_count_range_model_json - ) + 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 class TestModel_BareMetalServerProfileDiskQuantityDependent: @@ -87246,35 +82626,19 @@ def test_bare_metal_server_profile_disk_quantity_dependent_serialization(self): 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 - ) + 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() - ) - assert ( - bare_metal_server_profile_disk_quantity_dependent_model_json2 - == bare_metal_server_profile_disk_quantity_dependent_model_json - ) + 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 class TestModel_BareMetalServerProfileDiskQuantityEnum: @@ -87294,30 +82658,19 @@ def test_bare_metal_server_profile_disk_quantity_enum_serialization(self): 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() - ) - assert ( - bare_metal_server_profile_disk_quantity_enum_model_json2 - == bare_metal_server_profile_disk_quantity_enum_model_json - ) + 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 class TestModel_BareMetalServerProfileDiskQuantityFixed: @@ -87336,32 +82689,19 @@ def test_bare_metal_server_profile_disk_quantity_fixed_serialization(self): 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 - ) + 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() - ) - assert ( - bare_metal_server_profile_disk_quantity_fixed_model_json2 - == bare_metal_server_profile_disk_quantity_fixed_model_json - ) + 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 class TestModel_BareMetalServerProfileDiskQuantityRange: @@ -87383,32 +82723,19 @@ def test_bare_metal_server_profile_disk_quantity_range_serialization(self): 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 - ) + 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() - ) - assert ( - bare_metal_server_profile_disk_quantity_range_model_json2 - == bare_metal_server_profile_disk_quantity_range_model_json - ) + 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 class TestModel_BareMetalServerProfileDiskSizeDependent: @@ -87426,32 +82753,19 @@ def test_bare_metal_server_profile_disk_size_dependent_serialization(self): 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 - ) + 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() - ) - assert ( - bare_metal_server_profile_disk_size_dependent_model_json2 - == bare_metal_server_profile_disk_size_dependent_model_json - ) + 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 class TestModel_BareMetalServerProfileDiskSizeEnum: @@ -87471,27 +82785,19 @@ def test_bare_metal_server_profile_disk_size_enum_serialization(self): 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() - assert ( - bare_metal_server_profile_disk_size_enum_model_json2 == bare_metal_server_profile_disk_size_enum_model_json - ) + assert bare_metal_server_profile_disk_size_enum_model_json2 == bare_metal_server_profile_disk_size_enum_model_json class TestModel_BareMetalServerProfileDiskSizeFixed: @@ -87510,30 +82816,19 @@ 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() - ) - assert ( - bare_metal_server_profile_disk_size_fixed_model_json2 - == bare_metal_server_profile_disk_size_fixed_model_json - ) + 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 class TestModel_BareMetalServerProfileDiskSizeRange: @@ -87555,30 +82850,19 @@ 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() - ) - assert ( - bare_metal_server_profile_disk_size_range_model_json2 - == bare_metal_server_profile_disk_size_range_model_json - ) + 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 class TestModel_BareMetalServerProfileIdentityByHref: @@ -87593,35 +82877,22 @@ 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() - ) - assert ( - bare_metal_server_profile_identity_by_href_model_json2 - == bare_metal_server_profile_identity_by_href_model_json - ) + 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 class TestModel_BareMetalServerProfileIdentityByName: @@ -87639,30 +82910,19 @@ def test_bare_metal_server_profile_identity_by_name_serialization(self): 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() - ) - assert ( - bare_metal_server_profile_identity_by_name_model_json2 - == bare_metal_server_profile_identity_by_name_model_json - ) + 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 class TestModel_BareMetalServerProfileMemoryDependent: @@ -87680,30 +82940,19 @@ def test_bare_metal_server_profile_memory_dependent_serialization(self): 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() - ) - assert ( - bare_metal_server_profile_memory_dependent_model_json2 - == bare_metal_server_profile_memory_dependent_model_json - ) + 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 class TestModel_BareMetalServerProfileMemoryEnum: @@ -87723,18 +82972,12 @@ 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 @@ -87760,18 +83003,12 @@ 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 @@ -87800,18 +83037,12 @@ 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 @@ -87836,39 +83067,19 @@ def test_bare_metal_server_profile_network_attachment_count_dependent_serializat 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 - ) + 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() - ) - assert ( - bare_metal_server_profile_network_attachment_count_dependent_model_json2 - == bare_metal_server_profile_network_attachment_count_dependent_model_json - ) + 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 class TestModel_BareMetalServerProfileNetworkAttachmentCountRange: @@ -87888,39 +83099,19 @@ def test_bare_metal_server_profile_network_attachment_count_range_serialization( 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 - ) + 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() - ) - assert ( - bare_metal_server_profile_network_attachment_count_range_model_json2 - == bare_metal_server_profile_network_attachment_count_range_model_json - ) + 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 class TestModel_BareMetalServerProfileNetworkInterfaceCountDependent: @@ -87938,39 +83129,19 @@ def test_bare_metal_server_profile_network_interface_count_dependent_serializati 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 - ) + 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() - ) - assert ( - bare_metal_server_profile_network_interface_count_dependent_model_json2 - == bare_metal_server_profile_network_interface_count_dependent_model_json - ) + 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 class TestModel_BareMetalServerProfileNetworkInterfaceCountRange: @@ -87990,39 +83161,19 @@ def test_bare_metal_server_profile_network_interface_count_range_serialization(s 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 - ) + 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() - ) - assert ( - bare_metal_server_profile_network_interface_count_range_model_json2 - == bare_metal_server_profile_network_interface_count_range_model_json - ) + 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 class TestModel_BareMetalServerPrototypeBareMetalServerByNetworkAttachment: @@ -88051,6 +83202,13 @@ def test_bare_metal_server_prototype_bare_metal_server_by_network_attachment_ser bare_metal_server_profile_identity_model = {} # BareMetalServerProfileIdentityByName bare_metal_server_profile_identity_model['name'] = 'bx2-metal-192x768' + reservation_identity_model = {} # ReservationIdentityById + reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' + + bare_metal_server_reservation_affinity_prototype_model = {} # BareMetalServerReservationAffinityPrototype + bare_metal_server_reservation_affinity_prototype_model['policy'] = 'automatic' + bare_metal_server_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' @@ -88063,16 +83221,12 @@ 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 = {} # 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' @@ -88083,51 +83237,27 @@ def test_bare_metal_server_prototype_bare_metal_server_by_network_attachment_ser 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 = {} # 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['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 = {} # 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['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 = {} # 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['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' @@ -88135,62 +83265,31 @@ def test_bare_metal_server_prototype_bare_metal_server_by_network_attachment_ser bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json = {} 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['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['profile'] = bare_metal_server_profile_identity_model + bare_metal_server_prototype_bare_metal_server_by_network_attachment_model_json['reservation_affinity'] = bare_metal_server_reservation_affinity_prototype_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['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 - ) + 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() - ) - 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 - ) + 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 class TestModel_BareMetalServerPrototypeBareMetalServerByNetworkInterface: @@ -88219,6 +83318,13 @@ def test_bare_metal_server_prototype_bare_metal_server_by_network_interface_seri bare_metal_server_profile_identity_model = {} # BareMetalServerProfileIdentityByName bare_metal_server_profile_identity_model['name'] = 'bx2-metal-192x768' + reservation_identity_model = {} # ReservationIdentityById + reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' + + bare_metal_server_reservation_affinity_prototype_model = {} # BareMetalServerReservationAffinityPrototype + bare_metal_server_reservation_affinity_prototype_model['policy'] = 'automatic' + bare_metal_server_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] + resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' @@ -88231,9 +83337,7 @@ 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' @@ -88244,9 +83348,7 @@ def test_bare_metal_server_prototype_bare_metal_server_by_network_interface_seri 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 = {} # 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' @@ -88255,9 +83357,7 @@ def test_bare_metal_server_prototype_bare_metal_server_by_network_interface_seri 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 = {} # 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 @@ -88271,62 +83371,31 @@ def test_bare_metal_server_prototype_bare_metal_server_by_network_interface_seri bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json = {} 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['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['profile'] = bare_metal_server_profile_identity_model + bare_metal_server_prototype_bare_metal_server_by_network_interface_model_json['reservation_affinity'] = bare_metal_server_reservation_affinity_prototype_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['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 - ) + 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() - ) - 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 - ) + 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 class TestModel_CatalogOfferingIdentityCatalogOfferingByCRN: @@ -88341,40 +83410,22 @@ def test_catalog_offering_identity_catalog_offering_by_crn_serialization(self): # 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 - ) + 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() - ) - assert ( - catalog_offering_identity_catalog_offering_by_crn_model_json2 - == catalog_offering_identity_catalog_offering_by_crn_model_json - ) + 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 class TestModel_CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN: @@ -88389,44 +83440,22 @@ def test_catalog_offering_version_identity_catalog_offering_version_by_crn_seria # 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 - ) + 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() - ) - assert ( - catalog_offering_version_identity_catalog_offering_version_by_crn_model_json2 - == catalog_offering_version_identity_catalog_offering_version_by_crn_model_json - ) + 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: @@ -88441,44 +83470,22 @@ def test_catalog_offering_version_plan_identity_catalog_offering_version_plan_by # 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' - ) + 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 - ) - ) + 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 - ) - ) + 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 - ) + 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 - ) + 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: @@ -88493,23 +83500,15 @@ 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 @@ -88531,35 +83530,22 @@ 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:bucket-27200-lwx4cfvcue' # 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() - ) - assert ( - cloud_object_storage_bucket_identity_by_crn_model_json2 - == cloud_object_storage_bucket_identity_by_crn_model_json - ) + 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 class TestModel_CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName: @@ -88574,44 +83560,22 @@ def test_cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identi # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext: @@ -88619,58 +83583,31 @@ class TestModel_ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetRes Test Class for ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext """ - def test_cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_serialization( - self, - ): + def test_cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_serialization(self): """ Test serialization/deserialization for ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext """ # Construct a json representation of a ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext model - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model_json = ( - {} - ) - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model_json[ - 'address' - ] = '192.168.3.4' - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model_json[ - 'auto_delete' - ] = False - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model_json[ - 'name' - ] = 'my-cluster-network-subnet-reserved-ip' + cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model_json = {} + cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model_json['address'] = '192.168.3.4' + cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model_json['auto_delete'] = False + cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model_json['name'] = 'my-cluster-network-subnet-reserved-ip' # Construct a model instance of ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext by calling from_dict on the json representation - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model = ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext.from_dict( - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model_json - ) - assert ( - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model - != False - ) + cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model = ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext.from_dict(cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model_json) + assert cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model != False # Construct a model instance of ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext by calling from_dict on the json representation - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model_dict = ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext.from_dict( - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model_json - ).__dict__ - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model2 = ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext( - **cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model_dict - ) + cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model_dict = ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext.from_dict(cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model_json).__dict__ + cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model2 = ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext(**cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model_dict) # Verify the model instances are equivalent - assert ( - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model - == cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model2 - ) + assert cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model == cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model2 # Convert model instance back to dict and verify no loss of data - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model_json2 = ( - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model.to_dict() - ) - assert ( - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model_json2 - == cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model_json - ) + cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model_json2 = cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model.to_dict() + assert cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model_json2 == cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_prototype_cluster_network_interface_primary_ip_context_model_json class TestModel_ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext: @@ -88678,61 +83615,32 @@ class TestModel_ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentRef Test Class for ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext """ - def test_cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_serialization( - self, - ): + def test_cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_serialization(self): """ Test serialization/deserialization for ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext """ # Construct a json representation of a ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext model - cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model_json = ( - {} - ) - cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model_json[ - 'href' - ] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213' - cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model_json[ - 'id' - ] = '0717-fb880975-db45-4459-8548-64e3995ac213' - cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model_json[ - 'name' - ] = 'my-instance-network-attachment' - cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model_json[ - 'resource_type' - ] = 'instance_cluster_network_attachment' + cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model_json = {} + cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213' + cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model_json['id'] = '0717-fb880975-db45-4459-8548-64e3995ac213' + cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model_json['name'] = 'my-instance-network-attachment' + cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model_json['resource_type'] = 'instance_cluster_network_attachment' # Construct a model instance of ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext by calling from_dict on the json representation - cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model = ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext.from_dict( - cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model_json - ) - assert ( - cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model - != False - ) + cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model = ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext.from_dict(cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model_json) + assert cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model != False # Construct a model instance of ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext by calling from_dict on the json representation - cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model_dict = ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext.from_dict( - cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model_json - ).__dict__ - cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model2 = ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext( - **cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model_dict - ) + cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model_dict = ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext.from_dict(cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model_json).__dict__ + cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model2 = ClusterNetworkInterfaceTargetInstanceClusterNetworkAttachmentReferenceClusterNetworkInterfaceContext(**cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model_dict) # Verify the model instances are equivalent - assert ( - cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model - == cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model2 - ) + assert cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model == cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model2 # Convert model instance back to dict and verify no loss of data - cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model_json2 = ( - cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model.to_dict() - ) - assert ( - cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model_json2 - == cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model_json - ) + cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model_json2 = cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model.to_dict() + assert cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model_json2 == cluster_network_interface_target_instance_cluster_network_attachment_reference_cluster_network_interface_context_model_json class TestModel_ClusterNetworkProfileIdentityByHref: @@ -88747,32 +83655,22 @@ def test_cluster_network_profile_identity_by_href_serialization(self): # Construct a json representation of a ClusterNetworkProfileIdentityByHref model cluster_network_profile_identity_by_href_model_json = {} - cluster_network_profile_identity_by_href_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100' - ) + cluster_network_profile_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_network/profiles/h100' # Construct a model instance of ClusterNetworkProfileIdentityByHref by calling from_dict on the json representation - cluster_network_profile_identity_by_href_model = ClusterNetworkProfileIdentityByHref.from_dict( - cluster_network_profile_identity_by_href_model_json - ) + cluster_network_profile_identity_by_href_model = ClusterNetworkProfileIdentityByHref.from_dict(cluster_network_profile_identity_by_href_model_json) assert cluster_network_profile_identity_by_href_model != False # Construct a model instance of ClusterNetworkProfileIdentityByHref by calling from_dict on the json representation - cluster_network_profile_identity_by_href_model_dict = ClusterNetworkProfileIdentityByHref.from_dict( - cluster_network_profile_identity_by_href_model_json - ).__dict__ - cluster_network_profile_identity_by_href_model2 = ClusterNetworkProfileIdentityByHref( - **cluster_network_profile_identity_by_href_model_dict - ) + cluster_network_profile_identity_by_href_model_dict = ClusterNetworkProfileIdentityByHref.from_dict(cluster_network_profile_identity_by_href_model_json).__dict__ + cluster_network_profile_identity_by_href_model2 = ClusterNetworkProfileIdentityByHref(**cluster_network_profile_identity_by_href_model_dict) # Verify the model instances are equivalent assert cluster_network_profile_identity_by_href_model == cluster_network_profile_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data cluster_network_profile_identity_by_href_model_json2 = cluster_network_profile_identity_by_href_model.to_dict() - assert ( - cluster_network_profile_identity_by_href_model_json2 == cluster_network_profile_identity_by_href_model_json - ) + assert cluster_network_profile_identity_by_href_model_json2 == cluster_network_profile_identity_by_href_model_json class TestModel_ClusterNetworkProfileIdentityByName: @@ -88790,27 +83688,19 @@ def test_cluster_network_profile_identity_by_name_serialization(self): cluster_network_profile_identity_by_name_model_json['name'] = 'h100' # Construct a model instance of ClusterNetworkProfileIdentityByName by calling from_dict on the json representation - cluster_network_profile_identity_by_name_model = ClusterNetworkProfileIdentityByName.from_dict( - cluster_network_profile_identity_by_name_model_json - ) + cluster_network_profile_identity_by_name_model = ClusterNetworkProfileIdentityByName.from_dict(cluster_network_profile_identity_by_name_model_json) assert cluster_network_profile_identity_by_name_model != False # Construct a model instance of ClusterNetworkProfileIdentityByName by calling from_dict on the json representation - cluster_network_profile_identity_by_name_model_dict = ClusterNetworkProfileIdentityByName.from_dict( - cluster_network_profile_identity_by_name_model_json - ).__dict__ - cluster_network_profile_identity_by_name_model2 = ClusterNetworkProfileIdentityByName( - **cluster_network_profile_identity_by_name_model_dict - ) + cluster_network_profile_identity_by_name_model_dict = ClusterNetworkProfileIdentityByName.from_dict(cluster_network_profile_identity_by_name_model_json).__dict__ + cluster_network_profile_identity_by_name_model2 = ClusterNetworkProfileIdentityByName(**cluster_network_profile_identity_by_name_model_dict) # Verify the model instances are equivalent assert cluster_network_profile_identity_by_name_model == cluster_network_profile_identity_by_name_model2 # Convert model instance back to dict and verify no loss of data cluster_network_profile_identity_by_name_model_json2 = cluster_network_profile_identity_by_name_model.to_dict() - assert ( - cluster_network_profile_identity_by_name_model_json2 == cluster_network_profile_identity_by_name_model_json - ) + assert cluster_network_profile_identity_by_name_model_json2 == cluster_network_profile_identity_by_name_model_json class TestModel_ClusterNetworkSubnetIdentityByHref: @@ -88825,23 +83715,15 @@ def test_cluster_network_subnet_identity_by_href_serialization(self): # Construct a json representation of a ClusterNetworkSubnetIdentityByHref model cluster_network_subnet_identity_by_href_model_json = {} - cluster_network_subnet_identity_by_href_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - ) + cluster_network_subnet_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' # Construct a model instance of ClusterNetworkSubnetIdentityByHref by calling from_dict on the json representation - cluster_network_subnet_identity_by_href_model = ClusterNetworkSubnetIdentityByHref.from_dict( - cluster_network_subnet_identity_by_href_model_json - ) + cluster_network_subnet_identity_by_href_model = ClusterNetworkSubnetIdentityByHref.from_dict(cluster_network_subnet_identity_by_href_model_json) assert cluster_network_subnet_identity_by_href_model != False # Construct a model instance of ClusterNetworkSubnetIdentityByHref by calling from_dict on the json representation - cluster_network_subnet_identity_by_href_model_dict = ClusterNetworkSubnetIdentityByHref.from_dict( - cluster_network_subnet_identity_by_href_model_json - ).__dict__ - cluster_network_subnet_identity_by_href_model2 = ClusterNetworkSubnetIdentityByHref( - **cluster_network_subnet_identity_by_href_model_dict - ) + cluster_network_subnet_identity_by_href_model_dict = ClusterNetworkSubnetIdentityByHref.from_dict(cluster_network_subnet_identity_by_href_model_json).__dict__ + cluster_network_subnet_identity_by_href_model2 = ClusterNetworkSubnetIdentityByHref(**cluster_network_subnet_identity_by_href_model_dict) # Verify the model instances are equivalent assert cluster_network_subnet_identity_by_href_model == cluster_network_subnet_identity_by_href_model2 @@ -88866,18 +83748,12 @@ def test_cluster_network_subnet_identity_by_id_serialization(self): cluster_network_subnet_identity_by_id_model_json['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' # Construct a model instance of ClusterNetworkSubnetIdentityById by calling from_dict on the json representation - cluster_network_subnet_identity_by_id_model = ClusterNetworkSubnetIdentityById.from_dict( - cluster_network_subnet_identity_by_id_model_json - ) + cluster_network_subnet_identity_by_id_model = ClusterNetworkSubnetIdentityById.from_dict(cluster_network_subnet_identity_by_id_model_json) assert cluster_network_subnet_identity_by_id_model != False # Construct a model instance of ClusterNetworkSubnetIdentityById by calling from_dict on the json representation - cluster_network_subnet_identity_by_id_model_dict = ClusterNetworkSubnetIdentityById.from_dict( - cluster_network_subnet_identity_by_id_model_json - ).__dict__ - cluster_network_subnet_identity_by_id_model2 = ClusterNetworkSubnetIdentityById( - **cluster_network_subnet_identity_by_id_model_dict - ) + cluster_network_subnet_identity_by_id_model_dict = ClusterNetworkSubnetIdentityById.from_dict(cluster_network_subnet_identity_by_id_model_json).__dict__ + cluster_network_subnet_identity_by_id_model2 = ClusterNetworkSubnetIdentityById(**cluster_network_subnet_identity_by_id_model_dict) # Verify the model instances are equivalent assert cluster_network_subnet_identity_by_id_model == cluster_network_subnet_identity_by_id_model2 @@ -88899,50 +83775,24 @@ def test_cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_b # Construct a json representation of a ClusterNetworkSubnetPrototypeClusterNetworkSubnetByIPv4CIDRBlockPrototype model cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model_json = {} - cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model_json[ - 'ip_version' - ] = 'ipv4' - cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model_json['name'] = ( - 'my-cluster-network-subnet' - ) - cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model_json[ - 'ipv4_cidr_block' - ] = '10.0.0.0/24' + cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model_json['ip_version'] = 'ipv4' + cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model_json['name'] = 'my-cluster-network-subnet' + cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model_json['ipv4_cidr_block'] = '10.0.0.0/24' # Construct a model instance of ClusterNetworkSubnetPrototypeClusterNetworkSubnetByIPv4CIDRBlockPrototype by calling from_dict on the json representation - cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model = ( - ClusterNetworkSubnetPrototypeClusterNetworkSubnetByIPv4CIDRBlockPrototype.from_dict( - cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model_json - ) - ) + cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model = ClusterNetworkSubnetPrototypeClusterNetworkSubnetByIPv4CIDRBlockPrototype.from_dict(cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model_json) assert cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model != False # Construct a model instance of ClusterNetworkSubnetPrototypeClusterNetworkSubnetByIPv4CIDRBlockPrototype by calling from_dict on the json representation - cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model_dict = ( - ClusterNetworkSubnetPrototypeClusterNetworkSubnetByIPv4CIDRBlockPrototype.from_dict( - cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model_json - ).__dict__ - ) - cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model2 = ( - ClusterNetworkSubnetPrototypeClusterNetworkSubnetByIPv4CIDRBlockPrototype( - **cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model_dict - ) - ) + cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model_dict = ClusterNetworkSubnetPrototypeClusterNetworkSubnetByIPv4CIDRBlockPrototype.from_dict(cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model_json).__dict__ + cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model2 = ClusterNetworkSubnetPrototypeClusterNetworkSubnetByIPv4CIDRBlockPrototype(**cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model_dict) # Verify the model instances are equivalent - assert ( - cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model - == cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model2 - ) + assert cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model == cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model2 # Convert model instance back to dict and verify no loss of data - cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model_json2 = ( - cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model.to_dict() - ) - assert ( - cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model_json2 - == cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model_json - ) + cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model_json2 = cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model.to_dict() + assert cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model_json2 == cluster_network_subnet_prototype_cluster_network_subnet_by_i_pv4_cidr_block_prototype_model_json class TestModel_ClusterNetworkSubnetPrototypeClusterNetworkSubnetByTotalCountPrototype: @@ -88957,50 +83807,24 @@ def test_cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_ # Construct a json representation of a ClusterNetworkSubnetPrototypeClusterNetworkSubnetByTotalCountPrototype model cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model_json = {} - cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model_json['ip_version'] = ( - 'ipv4' - ) - cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model_json['name'] = ( - 'my-cluster-network-subnet' - ) - cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model_json[ - 'total_ipv4_address_count' - ] = 256 + cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model_json['ip_version'] = 'ipv4' + cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model_json['name'] = 'my-cluster-network-subnet' + cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model_json['total_ipv4_address_count'] = 256 # Construct a model instance of ClusterNetworkSubnetPrototypeClusterNetworkSubnetByTotalCountPrototype by calling from_dict on the json representation - cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model = ( - ClusterNetworkSubnetPrototypeClusterNetworkSubnetByTotalCountPrototype.from_dict( - cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model_json - ) - ) + cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model = ClusterNetworkSubnetPrototypeClusterNetworkSubnetByTotalCountPrototype.from_dict(cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model_json) assert cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model != False # Construct a model instance of ClusterNetworkSubnetPrototypeClusterNetworkSubnetByTotalCountPrototype by calling from_dict on the json representation - cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model_dict = ( - ClusterNetworkSubnetPrototypeClusterNetworkSubnetByTotalCountPrototype.from_dict( - cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model_json - ).__dict__ - ) - cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model2 = ( - ClusterNetworkSubnetPrototypeClusterNetworkSubnetByTotalCountPrototype( - **cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model_dict - ) - ) + cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model_dict = ClusterNetworkSubnetPrototypeClusterNetworkSubnetByTotalCountPrototype.from_dict(cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model_json).__dict__ + cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model2 = ClusterNetworkSubnetPrototypeClusterNetworkSubnetByTotalCountPrototype(**cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model_dict) # Verify the model instances are equivalent - assert ( - cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model - == cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model2 - ) + assert cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model == cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model2 # Convert model instance back to dict and verify no loss of data - cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model_json2 = ( - cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model.to_dict() - ) - assert ( - cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model_json2 - == cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model_json - ) + cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model_json2 = cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model.to_dict() + assert cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model_json2 == cluster_network_subnet_prototype_cluster_network_subnet_by_total_count_prototype_model_json class TestModel_ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext: @@ -89008,9 +83832,7 @@ class TestModel_ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceRefer Test Class for ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext """ - def test_cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_serialization( - self, - ): + def test_cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_serialization(self): """ Test serialization/deserialization for ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext """ @@ -89021,56 +83843,27 @@ def test_cluster_network_subnet_reserved_ip_target_cluster_network_interface_ref deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' # Construct a json representation of a ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext model - cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model_json = ( - {} - ) - cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model_json[ - 'deleted' - ] = deleted_model - cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model_json[ - 'href' - ] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb' - cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model_json[ - 'id' - ] = '0717-ffc092f7-5d02-4b93-ab69-26860529b9fb' - cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model_json[ - 'name' - ] = 'my-cluster-network-interface' - cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model_json[ - 'resource_type' - ] = 'cluster_network_interface' + cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model_json = {} + cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model_json['deleted'] = deleted_model + cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb' + cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model_json['id'] = '0717-ffc092f7-5d02-4b93-ab69-26860529b9fb' + cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model_json['name'] = 'my-cluster-network-interface' + cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model_json['resource_type'] = 'cluster_network_interface' # Construct a model instance of ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext by calling from_dict on the json representation - cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model = ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext.from_dict( - cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model_json - ) - assert ( - cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model - != False - ) + cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model = ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext.from_dict(cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model_json) + assert cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model != False # Construct a model instance of ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext by calling from_dict on the json representation - cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model_dict = ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext.from_dict( - cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model_json - ).__dict__ - cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model2 = ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext( - **cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model_dict - ) + cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model_dict = ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext.from_dict(cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model_json).__dict__ + cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model2 = ClusterNetworkSubnetReservedIPTargetClusterNetworkInterfaceReferenceClusterNetworkSubnetReservedIPTargetContext(**cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model_dict) # Verify the model instances are equivalent - assert ( - cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model - == cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model2 - ) + assert cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model == cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model2 # Convert model instance back to dict and verify no loss of data - cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model_json2 = ( - cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model.to_dict() - ) - assert ( - cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model_json2 - == cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model_json - ) + cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model_json2 = cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model.to_dict() + assert cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model_json2 == cluster_network_subnet_reserved_ip_target_cluster_network_interface_reference_cluster_network_subnet_reserved_ip_target_context_model_json class TestModel_DNSInstanceIdentityByCRN: @@ -89085,18 +83878,14 @@ 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/bb1b52262f7441a586f49068482f1e60:f761b566-030a-4696-8649-cc9d09889e88::' - ) + 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) 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_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 @@ -89149,23 +83938,15 @@ 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:0717-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:0717-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 @@ -89187,23 +83968,15 @@ 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/0717-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/0717-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 @@ -89228,18 +84001,12 @@ def test_dedicated_host_group_identity_by_id_serialization(self): dedicated_host_group_identity_by_id_model_json['id'] = '0717-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 @@ -89261,23 +84028,15 @@ 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 @@ -89302,18 +84061,12 @@ def test_dedicated_host_profile_identity_by_name_serialization(self): 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 @@ -89338,18 +84091,12 @@ 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 @@ -89376,18 +84123,12 @@ 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 @@ -89413,18 +84154,12 @@ 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 @@ -89453,18 +84188,12 @@ 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 @@ -89489,18 +84218,12 @@ 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 @@ -89527,18 +84250,12 @@ 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 @@ -89564,18 +84281,12 @@ 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 @@ -89604,18 +84315,12 @@ 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 @@ -89640,18 +84345,12 @@ 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 @@ -89678,18 +84377,12 @@ 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 @@ -89715,18 +84408,12 @@ 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 @@ -89755,18 +84442,12 @@ 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 @@ -89806,35 +84487,19 @@ def test_dedicated_host_prototype_dedicated_host_by_group_serialization(self): 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 - ) + 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() - ) - assert ( - dedicated_host_prototype_dedicated_host_by_group_model_json2 - == dedicated_host_prototype_dedicated_host_by_group_model_json - ) + 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 class TestModel_DedicatedHostPrototypeDedicatedHostByZone: @@ -89855,13 +84520,9 @@ def test_dedicated_host_prototype_dedicated_host_by_zone_serialization(self): 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 = {} # DedicatedHostGroupPrototypeDedicatedHostByZoneContext dedicated_host_group_prototype_dedicated_host_by_zone_context_model['name'] = 'my-dedicated-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['resource_group'] = resource_group_identity_model zone_identity_model = {} # ZoneIdentityByName zone_identity_model['name'] = 'us-south-1' @@ -89872,41 +84533,23 @@ def test_dedicated_host_prototype_dedicated_host_by_zone_serialization(self): 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['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 - ) + 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() - ) - assert ( - dedicated_host_prototype_dedicated_host_by_zone_model_json2 - == dedicated_host_prototype_dedicated_host_by_zone_model_json - ) + 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 class TestModel_EncryptionKeyIdentityByCRN: @@ -89921,20 +84564,14 @@ 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_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 @@ -89968,39 +84605,19 @@ def test_endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_seria 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 - ) + 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() - ) - assert ( - endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model_json2 - == endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_model_json - ) + 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 class TestModel_EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype: @@ -90008,55 +84625,30 @@ class TestModel_EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeP Test Class for EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype """ - def test_endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_serialization( - self, - ): + def test_endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_serialization(self): """ Test serialization/deserialization for EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype """ # Construct a json representation of a EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype model - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model_json = ( - {} - ) - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model_json[ - 'crn' - ] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213' - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model_json[ - 'resource_type' - ] = 'private_path_service_gateway' + endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model_json = {} + endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5' + endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model_json['resource_type'] = 'private_path_service_gateway' # Construct a model instance of EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype by calling from_dict on the json representation - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model = EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype.from_dict( - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model_json - ) - assert ( - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model - != False - ) + endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model = EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype.from_dict(endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model_json) + assert endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model != False # Construct a model instance of EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype by calling from_dict on the json representation - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model_dict = EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype.from_dict( - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model_json - ).__dict__ - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model2 = EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype( - **endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model_dict - ) + endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model_dict = EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype.from_dict(endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model_json).__dict__ + endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model2 = EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype(**endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model_dict) # Verify the model instances are equivalent - assert ( - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model - == endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model2 - ) + assert endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model == endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model2 # Convert model instance back to dict and verify no loss of data - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model_json2 = ( - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model.to_dict() - ) - assert ( - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model_json2 - == endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model_json - ) + endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model_json2 = endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model.to_dict() + assert endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model_json2 == endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_private_path_service_gateway_prototype_model_json class TestModel_EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype: @@ -90064,55 +84656,30 @@ class TestModel_EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeP Test Class for EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype """ - def test_endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_serialization( - self, - ): + def test_endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_serialization(self): """ Test serialization/deserialization for EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype """ # Construct a json representation of a EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype model - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model_json = ( - {} - ) - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model_json[ - 'crn' - ] = 'crn:v1:bluemix:public:cloudant:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:3527280b-9327-4411-8020-591092e60353::' - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model_json[ - 'resource_type' - ] = 'provider_cloud_service' + endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model_json = {} + endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model_json['crn'] = 'crn:v1:bluemix:public:cloudant:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:3527280b-9327-4411-8020-591092e60353::' + endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model_json['resource_type'] = 'provider_cloud_service' # Construct a model instance of EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype by calling from_dict on the json representation - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model = EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype.from_dict( - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model_json - ) - assert ( - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model - != False - ) + endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model = EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype.from_dict(endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model_json) + assert endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model != False # Construct a model instance of EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype by calling from_dict on the json representation - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model_dict = EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype.from_dict( - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model_json - ).__dict__ - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model2 = EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype( - **endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model_dict - ) + endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model_dict = EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype.from_dict(endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model_json).__dict__ + endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model2 = EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderCloudServicePrototype(**endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model_dict) # Verify the model instances are equivalent - assert ( - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model - == endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model2 - ) + assert endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model == endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model2 # Convert model instance back to dict and verify no loss of data - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model_json2 = ( - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model.to_dict() - ) - assert ( - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model_json2 - == endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model_json - ) + endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model_json2 = endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model.to_dict() + assert endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model_json2 == endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_cloud_service_prototype_model_json class TestModel_EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype: @@ -90120,55 +84687,30 @@ class TestModel_EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeP Test Class for EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype """ - def test_endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_serialization( - self, - ): + def test_endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_serialization(self): """ Test serialization/deserialization for EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype """ # Construct a json representation of a EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype model - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model_json = ( - {} - ) - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model_json[ - 'name' - ] = 'ibm-ntp-server' - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model_json[ - 'resource_type' - ] = 'provider_infrastructure_service' + endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model_json = {} + endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model_json['name'] = 'ibm-ntp-server' + endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model_json['resource_type'] = 'provider_infrastructure_service' # Construct a model instance of EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype by calling from_dict on the json representation - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model = EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype.from_dict( - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model_json - ) - assert ( - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model - != False - ) + endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model = EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype.from_dict(endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model_json) + assert endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model != False # Construct a model instance of EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype by calling from_dict on the json representation - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model_dict = EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype.from_dict( - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model_json - ).__dict__ - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model2 = EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype( - **endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model_dict - ) + endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model_dict = EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype.from_dict(endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model_json).__dict__ + endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model2 = EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype(**endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model_dict) # Verify the model instances are equivalent - assert ( - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model - == endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model2 - ) + assert endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model == endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model2 # Convert model instance back to dict and verify no loss of data - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model_json2 = ( - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model.to_dict() - ) - assert ( - endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model_json2 - == endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model_json - ) + endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model_json2 = endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model.to_dict() + assert endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model_json2 == endpoint_gateway_target_prototype_endpoint_gateway_target_resource_type_provider_infrastructure_service_prototype_model_json class TestModel_EndpointGatewayTargetPrivatePathServiceGatewayReference: @@ -90200,60 +84742,28 @@ def test_endpoint_gateway_target_private_path_service_gateway_reference_serializ # Construct a json representation of a EndpointGatewayTargetPrivatePathServiceGatewayReference model endpoint_gateway_target_private_path_service_gateway_reference_model_json = {} - endpoint_gateway_target_private_path_service_gateway_reference_model_json['crn'] = ( - 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r134-fb880975-db45-4459-8548-64e3995ac213' - ) + endpoint_gateway_target_private_path_service_gateway_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::private-path-service-gateway:r006-7268d425-59b7-48fd-9735-81a7271657d5' endpoint_gateway_target_private_path_service_gateway_reference_model_json['deleted'] = deleted_model - endpoint_gateway_target_private_path_service_gateway_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r134-fb880975-db45-4459-8548-64e3995ac213' - ) - endpoint_gateway_target_private_path_service_gateway_reference_model_json['id'] = ( - 'r134-fb880975-db45-4459-8548-64e3995ac213' - ) - endpoint_gateway_target_private_path_service_gateway_reference_model_json['name'] = ( - 'my-private-path-service-gateway' - ) - endpoint_gateway_target_private_path_service_gateway_reference_model_json['remote'] = ( - private_path_service_gateway_remote_model - ) - endpoint_gateway_target_private_path_service_gateway_reference_model_json['resource_type'] = ( - 'private_path_service_gateway' - ) + endpoint_gateway_target_private_path_service_gateway_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/private_path_service_gateways/r006-7268d425-59b7-48fd-9735-81a7271657d5' + endpoint_gateway_target_private_path_service_gateway_reference_model_json['id'] = 'r006-7268d425-59b7-48fd-9735-81a7271657d5' + endpoint_gateway_target_private_path_service_gateway_reference_model_json['name'] = 'my-private-path-service-gateway' + endpoint_gateway_target_private_path_service_gateway_reference_model_json['remote'] = private_path_service_gateway_remote_model + endpoint_gateway_target_private_path_service_gateway_reference_model_json['resource_type'] = 'private_path_service_gateway' # Construct a model instance of EndpointGatewayTargetPrivatePathServiceGatewayReference by calling from_dict on the json representation - endpoint_gateway_target_private_path_service_gateway_reference_model = ( - EndpointGatewayTargetPrivatePathServiceGatewayReference.from_dict( - endpoint_gateway_target_private_path_service_gateway_reference_model_json - ) - ) + endpoint_gateway_target_private_path_service_gateway_reference_model = EndpointGatewayTargetPrivatePathServiceGatewayReference.from_dict(endpoint_gateway_target_private_path_service_gateway_reference_model_json) assert endpoint_gateway_target_private_path_service_gateway_reference_model != False # Construct a model instance of EndpointGatewayTargetPrivatePathServiceGatewayReference by calling from_dict on the json representation - endpoint_gateway_target_private_path_service_gateway_reference_model_dict = ( - EndpointGatewayTargetPrivatePathServiceGatewayReference.from_dict( - endpoint_gateway_target_private_path_service_gateway_reference_model_json - ).__dict__ - ) - endpoint_gateway_target_private_path_service_gateway_reference_model2 = ( - EndpointGatewayTargetPrivatePathServiceGatewayReference( - **endpoint_gateway_target_private_path_service_gateway_reference_model_dict - ) - ) + endpoint_gateway_target_private_path_service_gateway_reference_model_dict = EndpointGatewayTargetPrivatePathServiceGatewayReference.from_dict(endpoint_gateway_target_private_path_service_gateway_reference_model_json).__dict__ + endpoint_gateway_target_private_path_service_gateway_reference_model2 = EndpointGatewayTargetPrivatePathServiceGatewayReference(**endpoint_gateway_target_private_path_service_gateway_reference_model_dict) # Verify the model instances are equivalent - assert ( - endpoint_gateway_target_private_path_service_gateway_reference_model - == endpoint_gateway_target_private_path_service_gateway_reference_model2 - ) + assert endpoint_gateway_target_private_path_service_gateway_reference_model == endpoint_gateway_target_private_path_service_gateway_reference_model2 # Convert model instance back to dict and verify no loss of data - endpoint_gateway_target_private_path_service_gateway_reference_model_json2 = ( - endpoint_gateway_target_private_path_service_gateway_reference_model.to_dict() - ) - assert ( - endpoint_gateway_target_private_path_service_gateway_reference_model_json2 - == endpoint_gateway_target_private_path_service_gateway_reference_model_json - ) + endpoint_gateway_target_private_path_service_gateway_reference_model_json2 = endpoint_gateway_target_private_path_service_gateway_reference_model.to_dict() + assert endpoint_gateway_target_private_path_service_gateway_reference_model_json2 == endpoint_gateway_target_private_path_service_gateway_reference_model_json class TestModel_EndpointGatewayTargetProviderCloudServiceReference: @@ -90268,45 +84778,23 @@ def test_endpoint_gateway_target_provider_cloud_service_reference_serialization( # 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['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 - ) + 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() - ) - assert ( - endpoint_gateway_target_provider_cloud_service_reference_model_json2 - == endpoint_gateway_target_provider_cloud_service_reference_model_json - ) + 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 class TestModel_EndpointGatewayTargetProviderInfrastructureServiceReference: @@ -90322,44 +84810,22 @@ def test_endpoint_gateway_target_provider_infrastructure_service_reference_seria # 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['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 - ) + 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() - ) - assert ( - endpoint_gateway_target_provider_infrastructure_service_reference_model_json2 - == endpoint_gateway_target_provider_infrastructure_service_reference_model_json - ) + 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 class TestModel_FloatingIPPrototypeFloatingIPByTarget: @@ -90377,9 +84843,7 @@ 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 = {} # FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById floating_ip_target_prototype_model['id'] = '0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' # Construct a json representation of a FloatingIPPrototypeFloatingIPByTarget model @@ -90389,30 +84853,19 @@ def test_floating_ip_prototype_floating_ip_by_target_serialization(self): 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() - ) - assert ( - floating_ip_prototype_floating_ip_by_target_model_json2 - == floating_ip_prototype_floating_ip_by_target_model_json - ) + 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 class TestModel_FloatingIPPrototypeFloatingIPByZone: @@ -90440,30 +84893,19 @@ def test_floating_ip_prototype_floating_ip_by_zone_serialization(self): 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() - ) - assert ( - floating_ip_prototype_floating_ip_by_zone_model_json2 - == floating_ip_prototype_floating_ip_by_zone_model_json - ) + 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 class TestModel_FloatingIPTargetBareMetalServerNetworkInterfaceReference: @@ -90484,66 +84926,34 @@ def test_floating_ip_target_bare_metal_server_network_interface_reference_serial reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.0.1.5' reserved_ip_reference_model['deleted'] = deleted_model - reserved_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - ) + reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/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['name'] = 'my-reserved-ip-z1' 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'] = 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/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - ) - floating_ip_target_bare_metal_server_network_interface_reference_model_json['id'] = ( - '0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - ) - 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' + floating_ip_target_bare_metal_server_network_interface_reference_model_json['id'] = '0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' + 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 - ) + 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() - ) - assert ( - floating_ip_target_bare_metal_server_network_interface_reference_model_json2 - == floating_ip_target_bare_metal_server_network_interface_reference_model_json - ) + 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 class TestModel_FloatingIPTargetNetworkInterfaceReference: @@ -90564,52 +84974,34 @@ def test_floating_ip_target_network_interface_reference_serialization(self): reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.0.1.5' reserved_ip_reference_model['deleted'] = deleted_model - reserved_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - ) + reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/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['name'] = 'my-reserved-ip-z1' 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'] = deleted_model - floating_ip_target_network_interface_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - ) + floating_ip_target_network_interface_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' floating_ip_target_network_interface_reference_model_json['id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' 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 - ) + 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() - ) - assert ( - floating_ip_target_network_interface_reference_model_json2 - == floating_ip_target_network_interface_reference_model_json - ) + 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 class TestModel_FloatingIPTargetPublicGatewayReference: @@ -90629,42 +85021,27 @@ def test_floating_ip_target_public_gateway_reference_serialization(self): # 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['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::public-gateway:r006-dc5431ef-1fc6-4861-adc9-a59d077d1241' floating_ip_target_public_gateway_reference_model_json['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways/r006-dc5431ef-1fc6-4861-adc9-a59d077d1241' + floating_ip_target_public_gateway_reference_model_json['id'] = 'r006-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() - ) - assert ( - floating_ip_target_public_gateway_reference_model_json2 - == floating_ip_target_public_gateway_reference_model_json - ) + 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 class TestModel_FloatingIPTargetVirtualNetworkInterfaceReference: @@ -90685,76 +85062,44 @@ def test_floating_ip_target_virtual_network_interface_reference_serialization(se reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.0.1.5' reserved_ip_reference_model['deleted'] = deleted_model - reserved_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - ) + reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/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['name'] = 'my-reserved-ip-z1' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' 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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) + floating_ip_target_virtual_network_interface_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' floating_ip_target_virtual_network_interface_reference_model_json['deleted'] = deleted_model - floating_ip_target_virtual_network_interface_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) - floating_ip_target_virtual_network_interface_reference_model_json['id'] = ( - '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) + floating_ip_target_virtual_network_interface_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + floating_ip_target_virtual_network_interface_reference_model_json['id'] = '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' 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 - ) + 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() - ) - assert ( - floating_ip_target_virtual_network_interface_reference_model_json2 - == floating_ip_target_virtual_network_interface_reference_model_json - ) + 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 class TestModel_FlowLogCollectorTargetInstanceNetworkAttachmentReference: @@ -90775,34 +85120,22 @@ def test_flow_log_collector_target_instance_network_attachment_reference_seriali reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.0.1.5' reserved_ip_reference_model['deleted'] = deleted_model - reserved_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - ) + reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/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['name'] = 'my-reserved-ip-z1' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' 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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) - virtual_network_interface_reference_attachment_context_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) + 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + virtual_network_interface_reference_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' virtual_network_interface_reference_attachment_context_model['id'] = '0717-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' @@ -90810,60 +85143,28 @@ def test_flow_log_collector_target_instance_network_attachment_reference_seriali # 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'] = deleted_model - flow_log_collector_target_instance_network_attachment_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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['virtual_network_interface'] = ( - virtual_network_interface_reference_attachment_context_model - ) + flow_log_collector_target_instance_network_attachment_reference_model_json['virtual_network_interface'] = virtual_network_interface_reference_attachment_context_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 - ) + 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() - ) - assert ( - flow_log_collector_target_instance_network_attachment_reference_model_json2 - == flow_log_collector_target_instance_network_attachment_reference_model_json - ) + 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 class TestModel_FlowLogCollectorTargetInstanceReference: @@ -90883,41 +85184,26 @@ def test_flow_log_collector_target_instance_reference_serialization(self): # 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + flow_log_collector_target_instance_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' flow_log_collector_target_instance_reference_model_json['deleted'] = deleted_model - flow_log_collector_target_instance_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + flow_log_collector_target_instance_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' flow_log_collector_target_instance_reference_model_json['id'] = '0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' 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() - ) - assert ( - flow_log_collector_target_instance_reference_model_json2 - == flow_log_collector_target_instance_reference_model_json - ) + 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 class TestModel_FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext: @@ -90938,53 +85224,25 @@ def test_flow_log_collector_target_network_interface_reference_target_context_se # 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'] = deleted_model - flow_log_collector_target_network_interface_reference_target_context_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - ) - flow_log_collector_target_network_interface_reference_target_context_model_json['id'] = ( - '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - ) - 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' + flow_log_collector_target_network_interface_reference_target_context_model_json['id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' + 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 - ) + 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() - ) - assert ( - flow_log_collector_target_network_interface_reference_target_context_model_json2 - == flow_log_collector_target_network_interface_reference_target_context_model_json - ) + 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 class TestModel_FlowLogCollectorTargetSubnetReference: @@ -91004,42 +85262,27 @@ def test_flow_log_collector_target_subnet_reference_serialization(self): # 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['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'] = 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['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() - ) - assert ( - flow_log_collector_target_subnet_reference_model_json2 - == flow_log_collector_target_subnet_reference_model_json - ) + 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 class TestModel_FlowLogCollectorTargetVPCReference: @@ -91059,30 +85302,20 @@ def test_flow_log_collector_target_vpc_reference_serialization(self): # 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['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'] = 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['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' # 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 @@ -91104,56 +85337,26 @@ def test_flow_log_collector_target_virtual_network_interface_reference_attachmen # 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) - flow_log_collector_target_virtual_network_interface_reference_attachment_context_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) - flow_log_collector_target_virtual_network_interface_reference_attachment_context_model_json['id'] = ( - '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) - 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + flow_log_collector_target_virtual_network_interface_reference_attachment_context_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + flow_log_collector_target_virtual_network_interface_reference_attachment_context_model_json['id'] = '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_ImageIdentityByCRN: @@ -91168,9 +85371,7 @@ 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) @@ -91200,9 +85401,7 @@ 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) @@ -91266,9 +85465,7 @@ 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' @@ -91288,15 +85485,11 @@ def test_image_prototype_image_by_file_serialization(self): 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_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 @@ -91323,9 +85516,7 @@ 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' @@ -91340,18 +85531,12 @@ def test_image_prototype_image_by_source_volume_serialization(self): 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 @@ -91373,61 +85558,31 @@ def test_instance_catalog_offering_prototype_catalog_offering_by_offering_serial # Construct dict forms of any model objects needed in order to build this 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_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' - ) + 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['plan'] = ( - catalog_offering_version_plan_identity_model - ) - 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 - ) + 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() - ) - assert ( - instance_catalog_offering_prototype_catalog_offering_by_offering_model_json2 - == instance_catalog_offering_prototype_catalog_offering_by_offering_model_json - ) + 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 class TestModel_InstanceCatalogOfferingPrototypeCatalogOfferingByVersion: @@ -91442,61 +85597,31 @@ def test_instance_catalog_offering_prototype_catalog_offering_by_version_seriali # Construct dict forms of any model objects needed in order to build this 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_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' - ) + 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['plan'] = ( - catalog_offering_version_plan_identity_model - ) - 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 - ) + 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() - ) - assert ( - instance_catalog_offering_prototype_catalog_offering_by_version_model_json2 - == instance_catalog_offering_prototype_catalog_offering_by_version_model_json - ) + 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 class TestModel_InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref: @@ -91504,52 +85629,29 @@ class TestModel_InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNe Test Class for InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref """ - def test_instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_serialization( - self, - ): + def test_instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_serialization(self): """ Test serialization/deserialization for InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref """ # Construct a json representation of a InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref model - instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_model_json = ( - {} - ) - instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_model_json[ - 'href' - ] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213' + instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_model_json = {} + instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/cluster_network_attachments/0717-fb880975-db45-4459-8548-64e3995ac213' # Construct a model instance of InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref by calling from_dict on the json representation - instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_model = InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref.from_dict( - instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_model_json - ) - assert ( - instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_model - != False - ) + instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_model = InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref.from_dict(instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_model_json) + assert instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_model != False # Construct a model instance of InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref by calling from_dict on the json representation - instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_model_dict = InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref.from_dict( - instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_model_json - ).__dict__ - instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_model2 = InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref( - **instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_model_dict - ) + instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_model_dict = InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref.from_dict(instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_model_json).__dict__ + instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_model2 = InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityByHref(**instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_model_dict) # Verify the model instances are equivalent - assert ( - instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_model - == instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_model2 - ) + assert instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_model == instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_model_json2 = ( - instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_model.to_dict() - ) - assert ( - instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_model_json2 - == instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_model_json - ) + instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_model_json2 = instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_model.to_dict() + assert instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_model_json2 == instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_href_model_json class TestModel_InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById: @@ -91557,52 +85659,29 @@ class TestModel_InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNe Test Class for InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById """ - def test_instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_serialization( - self, - ): + def test_instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_serialization(self): """ Test serialization/deserialization for InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById """ # Construct a json representation of a InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById model - instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_model_json = ( - {} - ) - instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_model_json[ - 'id' - ] = '0717-fb880975-db45-4459-8548-64e3995ac213' + instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_model_json = {} + instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_model_json['id'] = '0717-fb880975-db45-4459-8548-64e3995ac213' # Construct a model instance of InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById by calling from_dict on the json representation - instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_model = InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById.from_dict( - instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_model_json - ) - assert ( - instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_model - != False - ) + instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_model = InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById.from_dict(instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_model_json) + assert instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_model != False # Construct a model instance of InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById by calling from_dict on the json representation - instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_model_dict = InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById.from_dict( - instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_model_json - ).__dict__ - instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_model2 = InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById( - **instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_model_dict - ) + instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_model_dict = InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById.from_dict(instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_model_json).__dict__ + instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_model2 = InstanceClusterNetworkAttachmentBeforePrototypeInstanceClusterNetworkAttachmentIdentityById(**instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_model_dict) # Verify the model instances are equivalent - assert ( - instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_model - == instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_model2 - ) + assert instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_model == instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_model_json2 = ( - instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_model.to_dict() - ) - assert ( - instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_model_json2 - == instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_model_json - ) + instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_model_json2 = instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_model.to_dict() + assert instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_model_json2 == instance_cluster_network_attachment_before_prototype_instance_cluster_network_attachment_identity_by_id_model_json class TestModel_InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment: @@ -91610,18 +85689,14 @@ class TestModel_InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterface Test Class for InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment """ - def test_instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_serialization( - self, - ): + def test_instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_serialization(self): """ Test serialization/deserialization for InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment """ # Construct dict forms of any model objects needed in order to build this model. - cluster_network_interface_primary_ip_prototype_model = ( - {} - ) # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext + cluster_network_interface_primary_ip_prototype_model = {} # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext cluster_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' cluster_network_interface_primary_ip_prototype_model['auto_delete'] = False cluster_network_interface_primary_ip_prototype_model['name'] = 'my-cluster-network-subnet-reserved-ip' @@ -91630,53 +85705,26 @@ def test_instance_cluster_network_attachment_prototype_cluster_network_interface cluster_network_subnet_identity_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' # Construct a json representation of a InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment model - instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model_json = ( - {} - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model_json[ - 'auto_delete' - ] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model_json[ - 'name' - ] = 'my-cluster-network-interface' - instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model_json[ - 'primary_ip' - ] = cluster_network_interface_primary_ip_prototype_model - instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model_json[ - 'subnet' - ] = cluster_network_subnet_identity_model + instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model_json = {} + instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model_json['auto_delete'] = False + instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model_json['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model_json['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model_json['subnet'] = cluster_network_subnet_identity_model # Construct a model instance of InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment by calling from_dict on the json representation - instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model = InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment.from_dict( - instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model_json - ) - assert ( - instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model - != False - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model = InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment.from_dict(instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model_json) + assert instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model != False # Construct a model instance of InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment by calling from_dict on the json representation - instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model_dict = InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment.from_dict( - instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model_json - ).__dict__ - instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model2 = InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment( - **instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model_dict - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model_dict = InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment.from_dict(instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model_json).__dict__ + instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model2 = InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment(**instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model_dict) # Verify the model instances are equivalent - assert ( - instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model - == instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model2 - ) + assert instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model == instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model2 # Convert model instance back to dict and verify no loss of data - instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model_json2 = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model.to_dict() - ) - assert ( - instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model_json2 - == instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model_json - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model_json2 = instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model.to_dict() + assert instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model_json2 == instance_cluster_network_attachment_prototype_cluster_network_interface_instance_cluster_network_interface_prototype_instance_cluster_network_attachment_model_json class TestModel_InstanceGroupManagerAutoScale: @@ -91696,19 +85744,15 @@ def test_instance_group_manager_auto_scale_serialization(self): instance_group_manager_policy_reference_model = {} # InstanceGroupManagerPolicyReference instance_group_manager_policy_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7' + instance_group_manager_policy_reference_model['id'] = 'r006-ca664290-30eb-4ad7-9fb6-db45731f0be7' 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea' + instance_group_manager_auto_scale_model_json['id'] = 'r006-bd21f31f-8a05-4451-836d-ab0347e91fea' 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' @@ -91720,18 +85764,12 @@ def test_instance_group_manager_auto_scale_serialization(self): 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 @@ -91753,53 +85791,25 @@ def test_instance_group_manager_policy_prototype_instance_group_manager_target_p # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy: @@ -91814,59 +85824,29 @@ def test_instance_group_manager_policy_instance_group_manager_target_policy_seri # 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['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/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/policies/r006-ca664290-30eb-4ad7-9fb6-db45731f0be7' + instance_group_manager_policy_instance_group_manager_target_policy_model_json['id'] = 'r006-ca664290-30eb-4ad7-9fb6-db45731f0be7' + 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 - ) + 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() - ) - assert ( - instance_group_manager_policy_instance_group_manager_target_policy_model_json2 - == instance_group_manager_policy_instance_group_manager_target_policy_model_json - ) + 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 class TestModel_InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype: @@ -91881,60 +85861,28 @@ def test_instance_group_manager_prototype_instance_group_manager_auto_scale_prot # 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['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['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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype: @@ -91949,50 +85897,24 @@ def test_instance_group_manager_prototype_instance_group_manager_scheduled_proto # 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 - ) + 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() - ) - assert ( - instance_group_manager_prototype_instance_group_manager_scheduled_prototype_model_json2 - == instance_group_manager_prototype_instance_group_manager_scheduled_prototype_model_json - ) + 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 class TestModel_InstanceGroupManagerScheduled: @@ -92012,20 +85934,16 @@ def test_instance_group_manager_scheduled_serialization(self): instance_group_manager_action_reference_model = {} # InstanceGroupManagerActionReference instance_group_manager_action_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7' + instance_group_manager_action_reference_model['id'] = 'r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7' 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea' + instance_group_manager_scheduled_model_json['id'] = 'r006-bd21f31f-8a05-4451-836d-ab0347e91fea' 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' @@ -92033,18 +85951,12 @@ def test_instance_group_manager_scheduled_serialization(self): 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 @@ -92072,50 +85984,26 @@ def test_instance_group_manager_scheduled_action_manager_auto_scale_serializatio # 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'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea' + instance_group_manager_scheduled_action_manager_auto_scale_model_json['id'] = 'r006-bd21f31f-8a05-4451-836d-ab0347e91fea' 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 - ) + 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() - ) - assert ( - instance_group_manager_scheduled_action_manager_auto_scale_model_json2 - == instance_group_manager_scheduled_action_manager_auto_scale_model_json - ) + 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 class TestModel_InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfacePrototypeInstanceNetworkAttachmentContext: @@ -92123,25 +86011,19 @@ 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 = {} # 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' @@ -92156,75 +86038,32 @@ def test_instance_network_attachment_prototype_virtual_network_interface_virtual 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[ - '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 + 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['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 - ) - assert ( - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_prototype_instance_network_attachment_context_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstancePatchProfileInstanceProfileIdentityByHref: @@ -92239,44 +86078,22 @@ def test_instance_patch_profile_instance_profile_identity_by_href_serialization( # 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 - ) + 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() - ) - assert ( - instance_patch_profile_instance_profile_identity_by_href_model_json2 - == instance_patch_profile_instance_profile_identity_by_href_model_json - ) + 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 class TestModel_InstancePatchProfileInstanceProfileIdentityByName: @@ -92294,39 +86111,19 @@ def test_instance_patch_profile_instance_profile_identity_by_name_serialization( 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 - ) + 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() - ) - assert ( - instance_patch_profile_instance_profile_identity_by_name_model_json2 - == instance_patch_profile_instance_profile_identity_by_name_model_json - ) + 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 class TestModel_InstancePlacementTargetDedicatedHostGroupReference: @@ -92346,53 +86143,27 @@ def test_instance_placement_target_dedicated_host_group_reference_serialization( # 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:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' - ) + instance_placement_target_dedicated_host_group_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::dedicated-host-group:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' instance_placement_target_dedicated_host_group_reference_model_json['deleted'] = deleted_model - instance_placement_target_dedicated_host_group_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' - ) - instance_placement_target_dedicated_host_group_reference_model_json['id'] = ( - '0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' - ) + instance_placement_target_dedicated_host_group_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + instance_placement_target_dedicated_host_group_reference_model_json['id'] = '0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' instance_placement_target_dedicated_host_group_reference_model_json['name'] = 'my-dedicated-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 - ) + 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() - ) - assert ( - instance_placement_target_dedicated_host_group_reference_model_json2 - == instance_placement_target_dedicated_host_group_reference_model_json - ) + 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 class TestModel_InstancePlacementTargetDedicatedHostReference: @@ -92412,51 +86183,27 @@ def test_instance_placement_target_dedicated_host_reference_serialization(self): # 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['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'] = 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['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 - ) + 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() - ) - assert ( - instance_placement_target_dedicated_host_reference_model_json2 - == instance_placement_target_dedicated_host_reference_model_json - ) + 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 class TestModel_InstancePlacementTargetPlacementGroupReference: @@ -92476,51 +86223,27 @@ def test_instance_placement_target_placement_group_reference_serialization(self) # 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:r006-418fe842-a3e9-47b9-a938-1aa5bd632871' - ) + instance_placement_target_placement_group_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::placement-group:r006-418fe842-a3e9-47b9-a938-1aa5bd632871' instance_placement_target_placement_group_reference_model_json['deleted'] = deleted_model - instance_placement_target_placement_group_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r006-418fe842-a3e9-47b9-a938-1aa5bd632871' - ) - instance_placement_target_placement_group_reference_model_json['id'] = ( - 'r006-418fe842-a3e9-47b9-a938-1aa5bd632871' - ) + instance_placement_target_placement_group_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r006-418fe842-a3e9-47b9-a938-1aa5bd632871' + instance_placement_target_placement_group_reference_model_json['id'] = 'r006-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 - ) + 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() - ) - assert ( - instance_placement_target_placement_group_reference_model_json2 - == instance_placement_target_placement_group_reference_model_json - ) + 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 class TestModel_InstanceProfileBandwidthDependent: @@ -92538,18 +86261,12 @@ 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 @@ -92576,18 +86293,12 @@ def test_instance_profile_bandwidth_enum_serialization(self): 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 @@ -92613,18 +86324,12 @@ 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 @@ -92653,18 +86358,12 @@ 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 @@ -92689,39 +86388,19 @@ def test_instance_profile_cluster_network_attachment_count_dependent_serializati instance_profile_cluster_network_attachment_count_dependent_model_json['type'] = 'dependent' # Construct a model instance of InstanceProfileClusterNetworkAttachmentCountDependent by calling from_dict on the json representation - instance_profile_cluster_network_attachment_count_dependent_model = ( - InstanceProfileClusterNetworkAttachmentCountDependent.from_dict( - instance_profile_cluster_network_attachment_count_dependent_model_json - ) - ) + instance_profile_cluster_network_attachment_count_dependent_model = InstanceProfileClusterNetworkAttachmentCountDependent.from_dict(instance_profile_cluster_network_attachment_count_dependent_model_json) assert instance_profile_cluster_network_attachment_count_dependent_model != False # Construct a model instance of InstanceProfileClusterNetworkAttachmentCountDependent by calling from_dict on the json representation - instance_profile_cluster_network_attachment_count_dependent_model_dict = ( - InstanceProfileClusterNetworkAttachmentCountDependent.from_dict( - instance_profile_cluster_network_attachment_count_dependent_model_json - ).__dict__ - ) - instance_profile_cluster_network_attachment_count_dependent_model2 = ( - InstanceProfileClusterNetworkAttachmentCountDependent( - **instance_profile_cluster_network_attachment_count_dependent_model_dict - ) - ) + instance_profile_cluster_network_attachment_count_dependent_model_dict = InstanceProfileClusterNetworkAttachmentCountDependent.from_dict(instance_profile_cluster_network_attachment_count_dependent_model_json).__dict__ + instance_profile_cluster_network_attachment_count_dependent_model2 = InstanceProfileClusterNetworkAttachmentCountDependent(**instance_profile_cluster_network_attachment_count_dependent_model_dict) # Verify the model instances are equivalent - assert ( - instance_profile_cluster_network_attachment_count_dependent_model - == instance_profile_cluster_network_attachment_count_dependent_model2 - ) + assert instance_profile_cluster_network_attachment_count_dependent_model == instance_profile_cluster_network_attachment_count_dependent_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_cluster_network_attachment_count_dependent_model_json2 = ( - instance_profile_cluster_network_attachment_count_dependent_model.to_dict() - ) - assert ( - instance_profile_cluster_network_attachment_count_dependent_model_json2 - == instance_profile_cluster_network_attachment_count_dependent_model_json - ) + instance_profile_cluster_network_attachment_count_dependent_model_json2 = instance_profile_cluster_network_attachment_count_dependent_model.to_dict() + assert instance_profile_cluster_network_attachment_count_dependent_model_json2 == instance_profile_cluster_network_attachment_count_dependent_model_json class TestModel_InstanceProfileClusterNetworkAttachmentCountEnum: @@ -92741,39 +86420,19 @@ def test_instance_profile_cluster_network_attachment_count_enum_serialization(se instance_profile_cluster_network_attachment_count_enum_model_json['values'] = [0, 8, 16, 32] # Construct a model instance of InstanceProfileClusterNetworkAttachmentCountEnum by calling from_dict on the json representation - instance_profile_cluster_network_attachment_count_enum_model = ( - InstanceProfileClusterNetworkAttachmentCountEnum.from_dict( - instance_profile_cluster_network_attachment_count_enum_model_json - ) - ) + instance_profile_cluster_network_attachment_count_enum_model = InstanceProfileClusterNetworkAttachmentCountEnum.from_dict(instance_profile_cluster_network_attachment_count_enum_model_json) assert instance_profile_cluster_network_attachment_count_enum_model != False # Construct a model instance of InstanceProfileClusterNetworkAttachmentCountEnum by calling from_dict on the json representation - instance_profile_cluster_network_attachment_count_enum_model_dict = ( - InstanceProfileClusterNetworkAttachmentCountEnum.from_dict( - instance_profile_cluster_network_attachment_count_enum_model_json - ).__dict__ - ) - instance_profile_cluster_network_attachment_count_enum_model2 = ( - InstanceProfileClusterNetworkAttachmentCountEnum( - **instance_profile_cluster_network_attachment_count_enum_model_dict - ) - ) + instance_profile_cluster_network_attachment_count_enum_model_dict = InstanceProfileClusterNetworkAttachmentCountEnum.from_dict(instance_profile_cluster_network_attachment_count_enum_model_json).__dict__ + instance_profile_cluster_network_attachment_count_enum_model2 = InstanceProfileClusterNetworkAttachmentCountEnum(**instance_profile_cluster_network_attachment_count_enum_model_dict) # Verify the model instances are equivalent - assert ( - instance_profile_cluster_network_attachment_count_enum_model - == instance_profile_cluster_network_attachment_count_enum_model2 - ) + assert instance_profile_cluster_network_attachment_count_enum_model == instance_profile_cluster_network_attachment_count_enum_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_cluster_network_attachment_count_enum_model_json2 = ( - instance_profile_cluster_network_attachment_count_enum_model.to_dict() - ) - assert ( - instance_profile_cluster_network_attachment_count_enum_model_json2 - == instance_profile_cluster_network_attachment_count_enum_model_json - ) + instance_profile_cluster_network_attachment_count_enum_model_json2 = instance_profile_cluster_network_attachment_count_enum_model.to_dict() + assert instance_profile_cluster_network_attachment_count_enum_model_json2 == instance_profile_cluster_network_attachment_count_enum_model_json class TestModel_InstanceProfileClusterNetworkAttachmentCountRange: @@ -92794,39 +86453,19 @@ def test_instance_profile_cluster_network_attachment_count_range_serialization(s instance_profile_cluster_network_attachment_count_range_model_json['type'] = 'range' # Construct a model instance of InstanceProfileClusterNetworkAttachmentCountRange by calling from_dict on the json representation - instance_profile_cluster_network_attachment_count_range_model = ( - InstanceProfileClusterNetworkAttachmentCountRange.from_dict( - instance_profile_cluster_network_attachment_count_range_model_json - ) - ) + instance_profile_cluster_network_attachment_count_range_model = InstanceProfileClusterNetworkAttachmentCountRange.from_dict(instance_profile_cluster_network_attachment_count_range_model_json) assert instance_profile_cluster_network_attachment_count_range_model != False # Construct a model instance of InstanceProfileClusterNetworkAttachmentCountRange by calling from_dict on the json representation - instance_profile_cluster_network_attachment_count_range_model_dict = ( - InstanceProfileClusterNetworkAttachmentCountRange.from_dict( - instance_profile_cluster_network_attachment_count_range_model_json - ).__dict__ - ) - instance_profile_cluster_network_attachment_count_range_model2 = ( - InstanceProfileClusterNetworkAttachmentCountRange( - **instance_profile_cluster_network_attachment_count_range_model_dict - ) - ) + instance_profile_cluster_network_attachment_count_range_model_dict = InstanceProfileClusterNetworkAttachmentCountRange.from_dict(instance_profile_cluster_network_attachment_count_range_model_json).__dict__ + instance_profile_cluster_network_attachment_count_range_model2 = InstanceProfileClusterNetworkAttachmentCountRange(**instance_profile_cluster_network_attachment_count_range_model_dict) # Verify the model instances are equivalent - assert ( - instance_profile_cluster_network_attachment_count_range_model - == instance_profile_cluster_network_attachment_count_range_model2 - ) + assert instance_profile_cluster_network_attachment_count_range_model == instance_profile_cluster_network_attachment_count_range_model2 # Convert model instance back to dict and verify no loss of data - instance_profile_cluster_network_attachment_count_range_model_json2 = ( - instance_profile_cluster_network_attachment_count_range_model.to_dict() - ) - assert ( - instance_profile_cluster_network_attachment_count_range_model_json2 - == instance_profile_cluster_network_attachment_count_range_model_json - ) + instance_profile_cluster_network_attachment_count_range_model_json2 = instance_profile_cluster_network_attachment_count_range_model.to_dict() + assert instance_profile_cluster_network_attachment_count_range_model_json2 == instance_profile_cluster_network_attachment_count_range_model_json class TestModel_InstanceProfileDiskQuantityDependent: @@ -92844,27 +86483,19 @@ def test_instance_profile_disk_quantity_dependent_serialization(self): 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() - assert ( - instance_profile_disk_quantity_dependent_model_json2 == instance_profile_disk_quantity_dependent_model_json - ) + assert instance_profile_disk_quantity_dependent_model_json2 == instance_profile_disk_quantity_dependent_model_json class TestModel_InstanceProfileDiskQuantityEnum: @@ -92884,18 +86515,12 @@ 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 @@ -92921,18 +86546,12 @@ 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 @@ -92961,18 +86580,12 @@ 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 @@ -92997,18 +86610,12 @@ 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 @@ -93035,18 +86642,12 @@ 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 @@ -93072,18 +86673,12 @@ 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 @@ -93112,18 +86707,12 @@ 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 @@ -93148,15 +86737,11 @@ 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_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 @@ -93188,9 +86773,7 @@ def test_instance_profile_gpu_enum_serialization(self): 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_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 @@ -93221,9 +86804,7 @@ def test_instance_profile_gpu_fixed_serialization(self): 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_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 @@ -93249,18 +86830,12 @@ 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 @@ -93287,18 +86862,12 @@ 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 @@ -93324,18 +86893,12 @@ 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 @@ -93364,18 +86927,12 @@ 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 @@ -93408,9 +86965,7 @@ def test_instance_profile_gpu_range_serialization(self): 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_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 @@ -93433,23 +86988,15 @@ 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 @@ -93474,18 +87021,12 @@ 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 @@ -93510,18 +87051,12 @@ 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 @@ -93548,15 +87083,11 @@ 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_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 @@ -93583,15 +87114,11 @@ 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_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 @@ -93621,15 +87148,11 @@ 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_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 @@ -93655,18 +87178,12 @@ 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 @@ -93692,18 +87209,12 @@ 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 @@ -93728,37 +87239,19 @@ def test_instance_profile_network_attachment_count_dependent_serialization(self) 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 - ) + 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() - ) - assert ( - instance_profile_network_attachment_count_dependent_model_json2 - == instance_profile_network_attachment_count_dependent_model_json - ) + 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 class TestModel_InstanceProfileNetworkAttachmentCountRange: @@ -93778,35 +87271,19 @@ def test_instance_profile_network_attachment_count_range_serialization(self): 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 - ) + 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() - ) - assert ( - instance_profile_network_attachment_count_range_model_json2 - == instance_profile_network_attachment_count_range_model_json - ) + 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 class TestModel_InstanceProfileNetworkInterfaceCountDependent: @@ -93824,37 +87301,19 @@ def test_instance_profile_network_interface_count_dependent_serialization(self): 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 - ) + 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() - ) - assert ( - instance_profile_network_interface_count_dependent_model_json2 - == instance_profile_network_interface_count_dependent_model_json - ) + 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 class TestModel_InstanceProfileNetworkInterfaceCountRange: @@ -93874,33 +87333,19 @@ def test_instance_profile_network_interface_count_range_serialization(self): 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 - ) + 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() - ) - assert ( - instance_profile_network_interface_count_range_model_json2 - == instance_profile_network_interface_count_range_model_json - ) + 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 class TestModel_InstanceProfilePortSpeedDependent: @@ -93918,18 +87363,12 @@ 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 @@ -93955,18 +87394,12 @@ 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 @@ -93991,18 +87424,12 @@ 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 @@ -94033,9 +87460,7 @@ def test_instance_profile_vcpu_enum_serialization(self): 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_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 @@ -94066,9 +87491,7 @@ def test_instance_profile_vcpu_fixed_serialization(self): 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_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 @@ -94102,9 +87525,7 @@ def test_instance_profile_vcpu_range_serialization(self): 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_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 @@ -94130,30 +87551,19 @@ def test_instance_profile_volume_bandwidth_dependent_serialization(self): 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() - ) - assert ( - instance_profile_volume_bandwidth_dependent_model_json2 - == instance_profile_volume_bandwidth_dependent_model_json - ) + 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 class TestModel_InstanceProfileVolumeBandwidthEnum: @@ -94173,18 +87583,12 @@ def test_instance_profile_volume_bandwidth_enum_serialization(self): 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 @@ -94210,18 +87614,12 @@ 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 @@ -94250,18 +87648,12 @@ 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 @@ -94286,9 +87678,7 @@ def test_instance_prototype_instance_by_source_template_serialization(self): instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - cluster_network_interface_primary_ip_prototype_model = ( - {} - ) # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext + cluster_network_interface_primary_ip_prototype_model = {} # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext cluster_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' cluster_network_interface_primary_ip_prototype_model['auto_delete'] = False cluster_network_interface_primary_ip_prototype_model['name'] = 'my-cluster-network-subnet-reserved-ip' @@ -94296,26 +87686,14 @@ def test_instance_prototype_instance_by_source_template_serialization(self): cluster_network_subnet_identity_model = {} # ClusterNetworkSubnetIdentityById cluster_network_subnet_identity_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - instance_cluster_network_attachment_prototype_cluster_network_interface_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment + instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = ( - 'my-cluster-network-interface' - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = ( - cluster_network_interface_primary_ip_prototype_model - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = ( - cluster_network_subnet_identity_model - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = cluster_network_subnet_identity_model - instance_cluster_network_attachment_prototype_instance_context_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeInstanceContext - instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_model - ) + instance_cluster_network_attachment_prototype_instance_context_model = {} # InstanceClusterNetworkAttachmentPrototypeInstanceContext + instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = instance_cluster_network_attachment_prototype_cluster_network_interface_model instance_cluster_network_attachment_prototype_instance_context_model['name'] = 'my-instance-network-attachment' trusted_profile_identity_model = {} # TrustedProfileIdentityById @@ -94333,9 +87711,7 @@ def test_instance_prototype_instance_by_source_template_serialization(self): 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 = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName @@ -94345,7 +87721,7 @@ def test_instance_prototype_instance_by_source_template_serialization(self): reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype - instance_reservation_affinity_prototype_model['policy'] = 'disabled' + instance_reservation_affinity_prototype_model['policy'] = 'automatic' instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] resource_group_identity_model = {} # ResourceGroupIdentityById @@ -94363,9 +87739,7 @@ def test_instance_prototype_instance_by_source_template_serialization(self): 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' @@ -94379,26 +87753,16 @@ def test_instance_prototype_instance_by_source_template_serialization(self): 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 = {} # 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['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_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' - ) + 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 @@ -94407,16 +87771,12 @@ def test_instance_prototype_instance_by_source_template_serialization(self): 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 = {} # 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' @@ -94427,37 +87787,23 @@ def test_instance_prototype_instance_by_source_template_serialization(self): 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 = {} # 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['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['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['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_model['virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_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' @@ -94470,93 +87816,53 @@ def test_instance_prototype_instance_by_source_template_serialization(self): 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'] = '0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' 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['cluster_network_attachments'] = [ - instance_cluster_network_attachment_prototype_instance_context_model - ] + instance_prototype_instance_by_source_template_model_json['availability_policy'] = instance_availability_policy_prototype_model + instance_prototype_instance_by_source_template_model_json['cluster_network_attachments'] = [instance_cluster_network_attachment_prototype_instance_context_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['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['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['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['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['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['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['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 - ) + 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() - ) - assert ( - instance_prototype_instance_by_source_template_model_json2 - == instance_prototype_instance_by_source_template_model_json - ) + 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 class TestModel_InstanceTemplateIdentityByCRN: @@ -94571,23 +87877,15 @@ 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:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' # 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 @@ -94609,23 +87907,15 @@ 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/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' # 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 @@ -94647,21 +87937,15 @@ 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'] = '0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' # 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 @@ -94686,9 +87970,7 @@ def test_instance_template_prototype_instance_template_by_source_template_serial instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - cluster_network_interface_primary_ip_prototype_model = ( - {} - ) # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext + cluster_network_interface_primary_ip_prototype_model = {} # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext cluster_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' cluster_network_interface_primary_ip_prototype_model['auto_delete'] = False cluster_network_interface_primary_ip_prototype_model['name'] = 'my-cluster-network-subnet-reserved-ip' @@ -94696,26 +87978,14 @@ def test_instance_template_prototype_instance_template_by_source_template_serial cluster_network_subnet_identity_model = {} # ClusterNetworkSubnetIdentityById cluster_network_subnet_identity_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - instance_cluster_network_attachment_prototype_cluster_network_interface_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment + instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = ( - 'my-cluster-network-interface' - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = ( - cluster_network_interface_primary_ip_prototype_model - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = ( - cluster_network_subnet_identity_model - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = cluster_network_subnet_identity_model - instance_cluster_network_attachment_prototype_instance_context_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeInstanceContext - instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_model - ) + instance_cluster_network_attachment_prototype_instance_context_model = {} # InstanceClusterNetworkAttachmentPrototypeInstanceContext + instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = instance_cluster_network_attachment_prototype_cluster_network_interface_model instance_cluster_network_attachment_prototype_instance_context_model['name'] = 'my-instance-network-attachment' trusted_profile_identity_model = {} # TrustedProfileIdentityById @@ -94733,9 +88003,7 @@ def test_instance_template_prototype_instance_template_by_source_template_serial 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 = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName @@ -94745,7 +88013,7 @@ def test_instance_template_prototype_instance_template_by_source_template_serial reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype - instance_reservation_affinity_prototype_model['policy'] = 'disabled' + instance_reservation_affinity_prototype_model['policy'] = 'automatic' instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] resource_group_identity_model = {} # ResourceGroupIdentityById @@ -94763,9 +88031,7 @@ def test_instance_template_prototype_instance_template_by_source_template_serial 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' @@ -94779,26 +88045,16 @@ def test_instance_template_prototype_instance_template_by_source_template_serial 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 = {} # 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['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_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' - ) + 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 @@ -94807,16 +88063,12 @@ def test_instance_template_prototype_instance_template_by_source_template_serial 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 = {} # 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' @@ -94827,37 +88079,23 @@ def test_instance_template_prototype_instance_template_by_source_template_serial 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 = {} # 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['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['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['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_model['virtual_network_interface'] = instance_network_attachment_prototype_virtual_network_interface_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' @@ -94870,107 +88108,53 @@ def test_instance_template_prototype_instance_template_by_source_template_serial 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'] = '0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' 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['cluster_network_attachments'] = [ - instance_cluster_network_attachment_prototype_instance_context_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['availability_policy'] = instance_availability_policy_prototype_model + instance_template_prototype_instance_template_by_source_template_model_json['cluster_network_attachments'] = [instance_cluster_network_attachment_prototype_instance_context_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['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['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['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['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['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 - ) + 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() - ) - assert ( - instance_template_prototype_instance_template_by_source_template_model_json2 - == instance_template_prototype_instance_template_by_source_template_model_json - ) + 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 class TestModel_KeyIdentityByCRN: @@ -94985,9 +88169,7 @@ 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:r006-82679077-ac3b-4c10-be16-63e9c21f0f45' - ) + key_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::key:r006-82679077-ac3b-4c10-be16-63e9c21f0f45' # 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) @@ -95024,9 +88206,7 @@ def test_key_identity_by_fingerprint_serialization(self): 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_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 @@ -95049,9 +88229,7 @@ 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/r006-82679077-ac3b-4c10-be16-63e9c21f0f45' - ) + key_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys/r006-82679077-ac3b-4c10-be16-63e9c21f0f45' # 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) @@ -95104,53 +88282,29 @@ 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_LoadBalancerIdentityByCRN: @@ -95165,20 +88319,14 @@ 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:r006-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_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 @@ -95201,20 +88349,14 @@ 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/r006-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_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 @@ -95237,16 +88379,14 @@ 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'] = 'r006-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) 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_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 @@ -95269,44 +88409,22 @@ def test_load_balancer_listener_default_pool_patch_load_balancer_pool_identity_b # 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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-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 - ) + 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() - ) - 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 - ) + 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 class TestModel_LoadBalancerListenerDefaultPoolPatchLoadBalancerPoolIdentityById: @@ -95321,44 +88439,22 @@ def test_load_balancer_listener_default_pool_patch_load_balancer_pool_identity_b # 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'] = 'r006-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 - ) + 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() - ) - 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 - ) + 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 class TestModel_LoadBalancerListenerIdentityByHref: @@ -95373,23 +88469,15 @@ 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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' # 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 @@ -95411,21 +88499,15 @@ 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'] = 'r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' # 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 @@ -95440,9 +88522,7 @@ 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 """ @@ -95450,54 +88530,28 @@ def test_load_balancer_listener_policy_target_patch_load_balancer_listener_polic # 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['id'] = 'r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' # 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 - ) - ) - assert ( - load_balancer_listener_policy_target_patch_load_balancer_listener_policy_https_redirect_patch_model != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch: @@ -95505,58 +88559,30 @@ 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://ibm.com:443/new/{path}?{query}' + 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://ibm.com:443/new/{path}?{query}' # 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 - ) - ) - assert ( - load_balancer_listener_policy_target_patch_load_balancer_listener_policy_redirect_url_patch_model != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyHTTPSRedirectPrototype: @@ -95564,9 +88590,7 @@ 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 """ @@ -95574,53 +88598,28 @@ def test_load_balancer_listener_policy_target_prototype_load_balancer_listener_p # 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['id'] = 'r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' # 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 = {} + 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 - ) - assert ( - load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_https_redirect_prototype_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype: @@ -95628,55 +88627,30 @@ 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://ibm.com:443/new/{path}?{query}' + 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://ibm.com:443/new/{path}?{query}' # 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 - ) - assert ( - load_balancer_listener_policy_target_prototype_load_balancer_listener_policy_redirect_url_prototype_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyHTTPSRedirect: @@ -95696,57 +88670,29 @@ def test_load_balancer_listener_policy_target_load_balancer_listener_policy_http load_balancer_listener_reference_model = {} # LoadBalancerListenerReference load_balancer_listener_reference_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' + load_balancer_listener_reference_model['id'] = 'r006-97c05c26-4748-4db8-ac3f-d8a9c79a7091' # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL: @@ -95761,47 +88707,23 @@ def test_load_balancer_listener_policy_target_load_balancer_listener_policy_redi # 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://ibm.com:443/new/{path}?{query}' - ) + 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://ibm.com:443/new/{path}?{query}' # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_LoadBalancerListenerPolicyTargetLoadBalancerPoolReference: @@ -95822,48 +88744,24 @@ def test_load_balancer_listener_policy_target_load_balancer_pool_reference_seria # 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'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-70294e14-4e61-11e8-bcf4-0242ac110004' + load_balancer_listener_policy_target_load_balancer_pool_reference_model_json['id'] = 'r006-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 - ) + 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() - ) - assert ( - load_balancer_listener_policy_target_load_balancer_pool_reference_model_json2 - == load_balancer_listener_policy_target_load_balancer_pool_reference_model_json - ) + 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 class TestModel_LoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref: @@ -95878,44 +88776,22 @@ def test_load_balancer_pool_identity_load_balancer_pool_identity_by_href_seriali # 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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-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 - ) + 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() - ) - 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 - ) + 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 class TestModel_LoadBalancerPoolIdentityLoadBalancerPoolIdentityById: @@ -95930,44 +88806,22 @@ def test_load_balancer_pool_identity_load_balancer_pool_identity_by_id_serializa # 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'] = 'r006-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 - ) + 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() - ) - 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 - ) + 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 class TestModel_LoadBalancerPoolMemberTargetPrototypeIP: @@ -95985,32 +88839,19 @@ def test_load_balancer_pool_member_target_prototype_ip_serialization(self): 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 - ) + 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() - ) - assert ( - load_balancer_pool_member_target_prototype_ip_model_json2 - == load_balancer_pool_member_target_prototype_ip_model_json - ) + 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 class TestModel_LoadBalancerPoolMemberTargetIP: @@ -96028,18 +88869,12 @@ def test_load_balancer_pool_member_target_ip_serialization(self): 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 @@ -96066,50 +88901,26 @@ def test_load_balancer_pool_member_target_instance_reference_serialization(self) # 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + load_balancer_pool_member_target_instance_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::instance:0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' load_balancer_pool_member_target_instance_reference_model_json['deleted'] = deleted_model - load_balancer_pool_member_target_instance_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) - load_balancer_pool_member_target_instance_reference_model_json['id'] = ( - '0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + load_balancer_pool_member_target_instance_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' + load_balancer_pool_member_target_instance_reference_model_json['id'] = '0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' 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 - ) + 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() - ) - assert ( - load_balancer_pool_member_target_instance_reference_model_json2 - == load_balancer_pool_member_target_instance_reference_model_json - ) + 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 class TestModel_LoadBalancerProfileAvailabilityDependent: @@ -96127,30 +88938,19 @@ def test_load_balancer_profile_availability_dependent_serialization(self): load_balancer_profile_availability_dependent_model_json['type'] = 'dependent' # Construct a model instance of LoadBalancerProfileAvailabilityDependent by calling from_dict on the json representation - load_balancer_profile_availability_dependent_model = LoadBalancerProfileAvailabilityDependent.from_dict( - load_balancer_profile_availability_dependent_model_json - ) + load_balancer_profile_availability_dependent_model = LoadBalancerProfileAvailabilityDependent.from_dict(load_balancer_profile_availability_dependent_model_json) assert load_balancer_profile_availability_dependent_model != False # Construct a model instance of LoadBalancerProfileAvailabilityDependent by calling from_dict on the json representation - load_balancer_profile_availability_dependent_model_dict = LoadBalancerProfileAvailabilityDependent.from_dict( - load_balancer_profile_availability_dependent_model_json - ).__dict__ - load_balancer_profile_availability_dependent_model2 = LoadBalancerProfileAvailabilityDependent( - **load_balancer_profile_availability_dependent_model_dict - ) + load_balancer_profile_availability_dependent_model_dict = LoadBalancerProfileAvailabilityDependent.from_dict(load_balancer_profile_availability_dependent_model_json).__dict__ + load_balancer_profile_availability_dependent_model2 = LoadBalancerProfileAvailabilityDependent(**load_balancer_profile_availability_dependent_model_dict) # Verify the model instances are equivalent assert load_balancer_profile_availability_dependent_model == load_balancer_profile_availability_dependent_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_profile_availability_dependent_model_json2 = ( - load_balancer_profile_availability_dependent_model.to_dict() - ) - assert ( - load_balancer_profile_availability_dependent_model_json2 - == load_balancer_profile_availability_dependent_model_json - ) + load_balancer_profile_availability_dependent_model_json2 = load_balancer_profile_availability_dependent_model.to_dict() + assert load_balancer_profile_availability_dependent_model_json2 == load_balancer_profile_availability_dependent_model_json class TestModel_LoadBalancerProfileAvailabilityFixed: @@ -96169,27 +88969,19 @@ def test_load_balancer_profile_availability_fixed_serialization(self): load_balancer_profile_availability_fixed_model_json['value'] = 'region' # Construct a model instance of LoadBalancerProfileAvailabilityFixed by calling from_dict on the json representation - load_balancer_profile_availability_fixed_model = LoadBalancerProfileAvailabilityFixed.from_dict( - load_balancer_profile_availability_fixed_model_json - ) + load_balancer_profile_availability_fixed_model = LoadBalancerProfileAvailabilityFixed.from_dict(load_balancer_profile_availability_fixed_model_json) assert load_balancer_profile_availability_fixed_model != False # Construct a model instance of LoadBalancerProfileAvailabilityFixed by calling from_dict on the json representation - load_balancer_profile_availability_fixed_model_dict = LoadBalancerProfileAvailabilityFixed.from_dict( - load_balancer_profile_availability_fixed_model_json - ).__dict__ - load_balancer_profile_availability_fixed_model2 = LoadBalancerProfileAvailabilityFixed( - **load_balancer_profile_availability_fixed_model_dict - ) + load_balancer_profile_availability_fixed_model_dict = LoadBalancerProfileAvailabilityFixed.from_dict(load_balancer_profile_availability_fixed_model_json).__dict__ + load_balancer_profile_availability_fixed_model2 = LoadBalancerProfileAvailabilityFixed(**load_balancer_profile_availability_fixed_model_dict) # Verify the model instances are equivalent assert load_balancer_profile_availability_fixed_model == load_balancer_profile_availability_fixed_model2 # Convert model instance back to dict and verify no loss of data load_balancer_profile_availability_fixed_model_json2 = load_balancer_profile_availability_fixed_model.to_dict() - assert ( - load_balancer_profile_availability_fixed_model_json2 == load_balancer_profile_availability_fixed_model_json - ) + assert load_balancer_profile_availability_fixed_model_json2 == load_balancer_profile_availability_fixed_model_json class TestModel_LoadBalancerProfileIdentityByHref: @@ -96204,23 +88996,15 @@ 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 @@ -96245,18 +89029,12 @@ def test_load_balancer_profile_identity_by_name_serialization(self): 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 @@ -96281,39 +89059,19 @@ def test_load_balancer_profile_instance_groups_supported_dependent_serialization 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 - ) + 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() - ) - assert ( - load_balancer_profile_instance_groups_supported_dependent_model_json2 - == load_balancer_profile_instance_groups_supported_dependent_model_json - ) + 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 class TestModel_LoadBalancerProfileInstanceGroupsSupportedFixed: @@ -96332,37 +89090,19 @@ def test_load_balancer_profile_instance_groups_supported_fixed_serialization(sel 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 - ) + 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() - ) - assert ( - load_balancer_profile_instance_groups_supported_fixed_model_json2 - == load_balancer_profile_instance_groups_supported_fixed_model_json - ) + 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 class TestModel_LoadBalancerProfileRouteModeSupportedDependent: @@ -96380,37 +89120,19 @@ def test_load_balancer_profile_route_mode_supported_dependent_serialization(self 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 - ) + 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() - ) - assert ( - load_balancer_profile_route_mode_supported_dependent_model_json2 - == load_balancer_profile_route_mode_supported_dependent_model_json - ) + 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 class TestModel_LoadBalancerProfileRouteModeSupportedFixed: @@ -96429,35 +89151,19 @@ def test_load_balancer_profile_route_mode_supported_fixed_serialization(self): 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 - ) + 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() - ) - assert ( - load_balancer_profile_route_mode_supported_fixed_model_json2 - == load_balancer_profile_route_mode_supported_fixed_model_json - ) + 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 class TestModel_LoadBalancerProfileSecurityGroupsSupportedDependent: @@ -96475,39 +89181,19 @@ def test_load_balancer_profile_security_groups_supported_dependent_serialization 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 - ) + 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() - ) - assert ( - load_balancer_profile_security_groups_supported_dependent_model_json2 - == load_balancer_profile_security_groups_supported_dependent_model_json - ) + 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 class TestModel_LoadBalancerProfileSecurityGroupsSupportedFixed: @@ -96526,37 +89212,19 @@ def test_load_balancer_profile_security_groups_supported_fixed_serialization(sel 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 - ) + 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() - ) - assert ( - load_balancer_profile_security_groups_supported_fixed_model_json2 - == load_balancer_profile_security_groups_supported_fixed_model_json - ) + 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 class TestModel_LoadBalancerProfileSourceIPSessionPersistenceSupportedDependent: @@ -96574,39 +89242,19 @@ def test_load_balancer_profile_source_ip_session_persistence_supported_dependent load_balancer_profile_source_ip_session_persistence_supported_dependent_model_json['type'] = 'dependent' # Construct a model instance of LoadBalancerProfileSourceIPSessionPersistenceSupportedDependent by calling from_dict on the json representation - load_balancer_profile_source_ip_session_persistence_supported_dependent_model = ( - LoadBalancerProfileSourceIPSessionPersistenceSupportedDependent.from_dict( - load_balancer_profile_source_ip_session_persistence_supported_dependent_model_json - ) - ) + load_balancer_profile_source_ip_session_persistence_supported_dependent_model = LoadBalancerProfileSourceIPSessionPersistenceSupportedDependent.from_dict(load_balancer_profile_source_ip_session_persistence_supported_dependent_model_json) assert load_balancer_profile_source_ip_session_persistence_supported_dependent_model != False # Construct a model instance of LoadBalancerProfileSourceIPSessionPersistenceSupportedDependent by calling from_dict on the json representation - load_balancer_profile_source_ip_session_persistence_supported_dependent_model_dict = ( - LoadBalancerProfileSourceIPSessionPersistenceSupportedDependent.from_dict( - load_balancer_profile_source_ip_session_persistence_supported_dependent_model_json - ).__dict__ - ) - load_balancer_profile_source_ip_session_persistence_supported_dependent_model2 = ( - LoadBalancerProfileSourceIPSessionPersistenceSupportedDependent( - **load_balancer_profile_source_ip_session_persistence_supported_dependent_model_dict - ) - ) + load_balancer_profile_source_ip_session_persistence_supported_dependent_model_dict = LoadBalancerProfileSourceIPSessionPersistenceSupportedDependent.from_dict(load_balancer_profile_source_ip_session_persistence_supported_dependent_model_json).__dict__ + load_balancer_profile_source_ip_session_persistence_supported_dependent_model2 = LoadBalancerProfileSourceIPSessionPersistenceSupportedDependent(**load_balancer_profile_source_ip_session_persistence_supported_dependent_model_dict) # Verify the model instances are equivalent - assert ( - load_balancer_profile_source_ip_session_persistence_supported_dependent_model - == load_balancer_profile_source_ip_session_persistence_supported_dependent_model2 - ) + assert load_balancer_profile_source_ip_session_persistence_supported_dependent_model == load_balancer_profile_source_ip_session_persistence_supported_dependent_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_profile_source_ip_session_persistence_supported_dependent_model_json2 = ( - load_balancer_profile_source_ip_session_persistence_supported_dependent_model.to_dict() - ) - assert ( - load_balancer_profile_source_ip_session_persistence_supported_dependent_model_json2 - == load_balancer_profile_source_ip_session_persistence_supported_dependent_model_json - ) + load_balancer_profile_source_ip_session_persistence_supported_dependent_model_json2 = load_balancer_profile_source_ip_session_persistence_supported_dependent_model.to_dict() + assert load_balancer_profile_source_ip_session_persistence_supported_dependent_model_json2 == load_balancer_profile_source_ip_session_persistence_supported_dependent_model_json class TestModel_LoadBalancerProfileSourceIPSessionPersistenceSupportedFixed: @@ -96625,39 +89273,19 @@ def test_load_balancer_profile_source_ip_session_persistence_supported_fixed_ser load_balancer_profile_source_ip_session_persistence_supported_fixed_model_json['value'] = True # Construct a model instance of LoadBalancerProfileSourceIPSessionPersistenceSupportedFixed by calling from_dict on the json representation - load_balancer_profile_source_ip_session_persistence_supported_fixed_model = ( - LoadBalancerProfileSourceIPSessionPersistenceSupportedFixed.from_dict( - load_balancer_profile_source_ip_session_persistence_supported_fixed_model_json - ) - ) + load_balancer_profile_source_ip_session_persistence_supported_fixed_model = LoadBalancerProfileSourceIPSessionPersistenceSupportedFixed.from_dict(load_balancer_profile_source_ip_session_persistence_supported_fixed_model_json) assert load_balancer_profile_source_ip_session_persistence_supported_fixed_model != False # Construct a model instance of LoadBalancerProfileSourceIPSessionPersistenceSupportedFixed by calling from_dict on the json representation - load_balancer_profile_source_ip_session_persistence_supported_fixed_model_dict = ( - LoadBalancerProfileSourceIPSessionPersistenceSupportedFixed.from_dict( - load_balancer_profile_source_ip_session_persistence_supported_fixed_model_json - ).__dict__ - ) - load_balancer_profile_source_ip_session_persistence_supported_fixed_model2 = ( - LoadBalancerProfileSourceIPSessionPersistenceSupportedFixed( - **load_balancer_profile_source_ip_session_persistence_supported_fixed_model_dict - ) - ) + load_balancer_profile_source_ip_session_persistence_supported_fixed_model_dict = LoadBalancerProfileSourceIPSessionPersistenceSupportedFixed.from_dict(load_balancer_profile_source_ip_session_persistence_supported_fixed_model_json).__dict__ + load_balancer_profile_source_ip_session_persistence_supported_fixed_model2 = LoadBalancerProfileSourceIPSessionPersistenceSupportedFixed(**load_balancer_profile_source_ip_session_persistence_supported_fixed_model_dict) # Verify the model instances are equivalent - assert ( - load_balancer_profile_source_ip_session_persistence_supported_fixed_model - == load_balancer_profile_source_ip_session_persistence_supported_fixed_model2 - ) + assert load_balancer_profile_source_ip_session_persistence_supported_fixed_model == load_balancer_profile_source_ip_session_persistence_supported_fixed_model2 # Convert model instance back to dict and verify no loss of data - load_balancer_profile_source_ip_session_persistence_supported_fixed_model_json2 = ( - load_balancer_profile_source_ip_session_persistence_supported_fixed_model.to_dict() - ) - assert ( - load_balancer_profile_source_ip_session_persistence_supported_fixed_model_json2 - == load_balancer_profile_source_ip_session_persistence_supported_fixed_model_json - ) + load_balancer_profile_source_ip_session_persistence_supported_fixed_model_json2 = load_balancer_profile_source_ip_session_persistence_supported_fixed_model.to_dict() + assert load_balancer_profile_source_ip_session_persistence_supported_fixed_model_json2 == load_balancer_profile_source_ip_session_persistence_supported_fixed_model_json class TestModel_LoadBalancerProfileUDPSupportedDependent: @@ -96675,32 +89303,19 @@ def test_load_balancer_profile_udp_supported_dependent_serialization(self): 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 - ) + 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() - ) - assert ( - load_balancer_profile_udp_supported_dependent_model_json2 - == load_balancer_profile_udp_supported_dependent_model_json - ) + 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 class TestModel_LoadBalancerProfileUDPSupportedFixed: @@ -96719,30 +89334,19 @@ 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() - ) - assert ( - load_balancer_profile_udp_supported_fixed_model_json2 - == load_balancer_profile_udp_supported_fixed_model_json - ) + 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 class TestModel_NetworkACLIdentityByCRN: @@ -96757,18 +89361,14 @@ 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) 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_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 @@ -96791,18 +89391,14 @@ 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) 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_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 @@ -96832,9 +89428,7 @@ def test_network_acl_identity_by_id_serialization(self): 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_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 @@ -96861,16 +89455,14 @@ def test_network_acl_prototype_network_acl_by_rules_serialization(self): resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' vpc_identity_model = {} # VPCIdentityById - vpc_identity_model['id'] = 'cf7cd5a-2f30-4336-a495-6addc820cd61' + vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' - 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['name'] = 'my-network-acl-rule' 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 @@ -96883,35 +89475,22 @@ def test_network_acl_prototype_network_acl_by_rules_serialization(self): 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['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() - ) - assert ( - network_acl_prototype_network_acl_by_rules_model_json2 - == network_acl_prototype_network_acl_by_rules_model_json - ) + 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 class TestModel_NetworkACLPrototypeNetworkACLBySourceNetworkACL: @@ -96930,7 +89509,7 @@ def test_network_acl_prototype_network_acl_by_source_network_acl_serialization(s resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' vpc_identity_model = {} # VPCIdentityById - vpc_identity_model['id'] = 'cf7cd5a-2f30-4336-a495-6addc820cd61' + vpc_identity_model['id'] = 'r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' network_acl_identity_model = {} # NetworkACLIdentityById network_acl_identity_model['id'] = 'a4e28308-8ee7-46ab-8108-9f881f22bdbf' @@ -96938,48 +89517,24 @@ def test_network_acl_prototype_network_acl_by_source_network_acl_serialization(s # 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['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['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 - ) + 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() - ) - assert ( - network_acl_prototype_network_acl_by_source_network_acl_model_json2 - == network_acl_prototype_network_acl_by_source_network_acl_model_json - ) + 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 class TestModel_NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref: @@ -96994,44 +89549,22 @@ def test_network_acl_rule_before_patch_network_acl_rule_identity_by_href_seriali # 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/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-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 - ) + 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() - ) - 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 - ) + 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 class TestModel_NetworkACLRuleBeforePatchNetworkACLRuleIdentityById: @@ -97046,44 +89579,22 @@ def test_network_acl_rule_before_patch_network_acl_rule_identity_by_id_serializa # 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'] = 'r006-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 - ) + 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() - ) - 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 - ) + 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 class TestModel_NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref: @@ -97098,44 +89609,22 @@ def test_network_acl_rule_before_prototype_network_acl_rule_identity_by_href_ser # 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/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-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 - ) + 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() - ) - 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 - ) + 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 class TestModel_NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById: @@ -97150,44 +89639,22 @@ def test_network_acl_rule_before_prototype_network_acl_rule_identity_by_id_seria # 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'] = 'r006-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 - ) + 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() - ) - 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 - ) + 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 class TestModel_NetworkACLRuleItemNetworkACLRuleProtocolAll: @@ -97207,11 +89674,9 @@ def test_network_acl_rule_item_network_acl_rule_protocol_all_serialization(self) network_acl_rule_reference_model = {} # NetworkACLRuleReference network_acl_rule_reference_model['deleted'] = 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_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model['id'] = 'r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model['name'] = 'my-allow-inbound-rule' # Construct a json representation of a NetworkACLRuleItemNetworkACLRuleProtocolAll model network_acl_rule_item_network_acl_rule_protocol_all_model_json = {} @@ -97220,47 +89685,27 @@ def test_network_acl_rule_item_network_acl_rule_protocol_all_serialization(self) 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_item_network_acl_rule_protocol_all_model_json['id'] = 'r006-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['name'] = 'my-network-acl-rule' 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 - ) + 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() - ) - assert ( - network_acl_rule_item_network_acl_rule_protocol_all_model_json2 - == network_acl_rule_item_network_acl_rule_protocol_all_model_json - ) + 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 class TestModel_NetworkACLRuleItemNetworkACLRuleProtocolICMP: @@ -97280,11 +89725,9 @@ def test_network_acl_rule_item_network_acl_rule_protocol_icmp_serialization(self network_acl_rule_reference_model = {} # NetworkACLRuleReference network_acl_rule_reference_model['deleted'] = 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_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model['id'] = 'r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model['name'] = 'my-allow-inbound-rule' # Construct a json representation of a NetworkACLRuleItemNetworkACLRuleProtocolICMP model network_acl_rule_item_network_acl_rule_protocol_icmp_model_json = {} @@ -97293,49 +89736,29 @@ def test_network_acl_rule_item_network_acl_rule_protocol_icmp_serialization(self 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_item_network_acl_rule_protocol_icmp_model_json['id'] = 'r006-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['name'] = 'my-network-acl-rule' 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 - ) + 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() - ) - assert ( - network_acl_rule_item_network_acl_rule_protocol_icmp_model_json2 - == network_acl_rule_item_network_acl_rule_protocol_icmp_model_json - ) + 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 class TestModel_NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP: @@ -97355,11 +89778,9 @@ def test_network_acl_rule_item_network_acl_rule_protocol_tcpudp_serialization(se network_acl_rule_reference_model = {} # NetworkACLRuleReference network_acl_rule_reference_model['deleted'] = 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_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model['id'] = 'r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model['name'] = 'my-allow-inbound-rule' # Construct a json representation of a NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP model network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json = {} @@ -97368,12 +89789,10 @@ def test_network_acl_rule_item_network_acl_rule_protocol_tcpudp_serialization(se 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json['id'] = 'r006-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['name'] = 'my-network-acl-rule' 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 @@ -97382,37 +89801,19 @@ def test_network_acl_rule_item_network_acl_rule_protocol_tcpudp_serialization(se 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 - ) + 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() - ) - assert ( - network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json2 - == network_acl_rule_item_network_acl_rule_protocol_tcpudp_model_json - ) + 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 class TestModel_NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype: @@ -97427,62 +89828,28 @@ def test_network_acl_rule_prototype_network_acl_context_network_acl_rule_protoco # 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-network-acl-rule' + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype: @@ -97490,73 +89857,37 @@ 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['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-network-acl-rule' + 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['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 - ) + 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() - ) - 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 - ) + 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 class TestModel_NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype: @@ -97564,83 +89895,39 @@ 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-network-acl-rule' + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype: @@ -97656,55 +89943,33 @@ def test_network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_seri # 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['id'] = 'r006-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['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['name'] = 'my-network-acl-rule' 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype: @@ -97720,57 +89985,35 @@ def test_network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_ser # 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['id'] = 'r006-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['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['name'] = 'my-network-acl-rule' 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype: @@ -97786,20 +90029,16 @@ def test_network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_s # 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['id'] = 'r006-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['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['name'] = 'my-network-acl-rule' 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 @@ -97808,39 +90047,19 @@ def test_network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_s 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_NetworkACLRuleNetworkACLRuleProtocolAll: @@ -97860,11 +90079,9 @@ def test_network_acl_rule_network_acl_rule_protocol_all_serialization(self): network_acl_rule_reference_model = {} # NetworkACLRuleReference network_acl_rule_reference_model['deleted'] = 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_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model['id'] = 'r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model['name'] = 'my-allow-inbound-rule' # Construct a json representation of a NetworkACLRuleNetworkACLRuleProtocolAll model network_acl_rule_network_acl_rule_protocol_all_model_json = {} @@ -97873,43 +90090,27 @@ def test_network_acl_rule_network_acl_rule_protocol_all_serialization(self): 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_network_acl_rule_protocol_all_model_json['id'] = 'r006-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['name'] = 'my-network-acl-rule' 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 - ) + 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() - ) - assert ( - network_acl_rule_network_acl_rule_protocol_all_model_json2 - == network_acl_rule_network_acl_rule_protocol_all_model_json - ) + 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 class TestModel_NetworkACLRuleNetworkACLRuleProtocolICMP: @@ -97929,11 +90130,9 @@ def test_network_acl_rule_network_acl_rule_protocol_icmp_serialization(self): network_acl_rule_reference_model = {} # NetworkACLRuleReference network_acl_rule_reference_model['deleted'] = 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_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model['id'] = 'r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model['name'] = 'my-allow-inbound-rule' # Construct a json representation of a NetworkACLRuleNetworkACLRuleProtocolICMP model network_acl_rule_network_acl_rule_protocol_icmp_model_json = {} @@ -97942,45 +90141,29 @@ def test_network_acl_rule_network_acl_rule_protocol_icmp_serialization(self): 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_network_acl_rule_protocol_icmp_model_json['id'] = 'r006-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['name'] = 'my-network-acl-rule' 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['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 - ) + 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() - ) - assert ( - network_acl_rule_network_acl_rule_protocol_icmp_model_json2 - == network_acl_rule_network_acl_rule_protocol_icmp_model_json - ) + 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 class TestModel_NetworkACLRuleNetworkACLRuleProtocolTCPUDP: @@ -98000,11 +90183,9 @@ def test_network_acl_rule_network_acl_rule_protocol_tcpudp_serialization(self): network_acl_rule_reference_model = {} # NetworkACLRuleReference network_acl_rule_reference_model['deleted'] = 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_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model['id'] = 'r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_reference_model['name'] = 'my-allow-inbound-rule' # Construct a json representation of a NetworkACLRuleNetworkACLRuleProtocolTCPUDP model network_acl_rule_network_acl_rule_protocol_tcpudp_model_json = {} @@ -98013,12 +90194,10 @@ def test_network_acl_rule_network_acl_rule_protocol_tcpudp_serialization(self): 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/r006-3217cb8b-5368-452a-9399-a84f14fb539d/rules/r006-8daca77a-4980-4d33-8f3e-7038797be8f9' + network_acl_rule_network_acl_rule_protocol_tcpudp_model_json['id'] = 'r006-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['name'] = 'my-network-acl-rule' 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 @@ -98027,35 +90206,19 @@ def test_network_acl_rule_network_acl_rule_protocol_tcpudp_serialization(self): 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 - ) + 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() - ) - assert ( - network_acl_rule_network_acl_rule_protocol_tcpudp_model_json2 - == network_acl_rule_network_acl_rule_protocol_tcpudp_model_json - ) + 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 class TestModel_NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext: @@ -98070,48 +90233,24 @@ def test_network_interface_ip_prototype_reserved_ip_prototype_network_interface_ # 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['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['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 - ) + 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() - ) - 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 - ) + 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 class TestModel_OperatingSystemIdentityByHref: @@ -98126,23 +90265,15 @@ 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-24-04-amd64' - ) + operating_system_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-24-04-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 @@ -98167,18 +90298,12 @@ def test_operating_system_identity_by_name_serialization(self): operating_system_identity_by_name_model_json['name'] = 'ubuntu-24-04-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 @@ -98206,44 +90331,22 @@ 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['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 - ) + 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() - ) - 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 - ) + 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 class TestModel_PublicGatewayIdentityPublicGatewayIdentityByCRN: @@ -98258,42 +90361,22 @@ def test_public_gateway_identity_public_gateway_identity_by_crn_serialization(se # 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:r006-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 - ) + 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() - ) - assert ( - public_gateway_identity_public_gateway_identity_by_crn_model_json2 - == public_gateway_identity_public_gateway_identity_by_crn_model_json - ) + 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 class TestModel_PublicGatewayIdentityPublicGatewayIdentityByHref: @@ -98308,44 +90391,22 @@ def test_public_gateway_identity_public_gateway_identity_by_href_serialization(s # 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/r006-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 - ) + 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() - ) - assert ( - public_gateway_identity_public_gateway_identity_by_href_model_json2 - == public_gateway_identity_public_gateway_identity_by_href_model_json - ) + 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 class TestModel_PublicGatewayIdentityPublicGatewayIdentityById: @@ -98360,40 +90421,22 @@ def test_public_gateway_identity_public_gateway_identity_by_id_serialization(sel # 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'] = 'r006-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 - ) + 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() - ) - assert ( - public_gateway_identity_public_gateway_identity_by_id_model_json2 - == public_gateway_identity_public_gateway_identity_by_id_model_json - ) + 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 class TestModel_RegionIdentityByHref: @@ -98468,18 +90511,14 @@ 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-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-ba49df72-37b8-43ac-98da-f8e029de0e63' - ) + reservation_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::reservation:0717-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) 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_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 @@ -98502,20 +90541,14 @@ 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/0717-ba49df72-37b8-43ac-98da-f8e029de0e63' - ) + reservation_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/reservations/0717-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_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 @@ -98545,9 +90578,7 @@ def test_reservation_identity_by_id_serialization(self): 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_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 @@ -98558,6 +90589,70 @@ def test_reservation_identity_by_id_serialization(self): assert reservation_identity_by_id_model_json2 == reservation_identity_by_id_model_json +class TestModel_ReservationProfileBareMetalServerProfileReference: + """ + Test Class for ReservationProfileBareMetalServerProfileReference + """ + + def test_reservation_profile_bare_metal_server_profile_reference_serialization(self): + """ + Test serialization/deserialization for ReservationProfileBareMetalServerProfileReference + """ + + # Construct a json representation of a ReservationProfileBareMetalServerProfileReference model + reservation_profile_bare_metal_server_profile_reference_model_json = {} + reservation_profile_bare_metal_server_profile_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768' + reservation_profile_bare_metal_server_profile_reference_model_json['name'] = 'bx2-metal-192x768' + reservation_profile_bare_metal_server_profile_reference_model_json['resource_type'] = 'bare_metal_server_profile' + + # Construct a model instance of ReservationProfileBareMetalServerProfileReference by calling from_dict on the json representation + reservation_profile_bare_metal_server_profile_reference_model = ReservationProfileBareMetalServerProfileReference.from_dict(reservation_profile_bare_metal_server_profile_reference_model_json) + assert reservation_profile_bare_metal_server_profile_reference_model != False + + # Construct a model instance of ReservationProfileBareMetalServerProfileReference by calling from_dict on the json representation + reservation_profile_bare_metal_server_profile_reference_model_dict = ReservationProfileBareMetalServerProfileReference.from_dict(reservation_profile_bare_metal_server_profile_reference_model_json).__dict__ + reservation_profile_bare_metal_server_profile_reference_model2 = ReservationProfileBareMetalServerProfileReference(**reservation_profile_bare_metal_server_profile_reference_model_dict) + + # Verify the model instances are equivalent + assert reservation_profile_bare_metal_server_profile_reference_model == reservation_profile_bare_metal_server_profile_reference_model2 + + # Convert model instance back to dict and verify no loss of data + reservation_profile_bare_metal_server_profile_reference_model_json2 = reservation_profile_bare_metal_server_profile_reference_model.to_dict() + assert reservation_profile_bare_metal_server_profile_reference_model_json2 == reservation_profile_bare_metal_server_profile_reference_model_json + + +class TestModel_ReservationProfileInstanceProfileReference: + """ + Test Class for ReservationProfileInstanceProfileReference + """ + + def test_reservation_profile_instance_profile_reference_serialization(self): + """ + Test serialization/deserialization for ReservationProfileInstanceProfileReference + """ + + # Construct a json representation of a ReservationProfileInstanceProfileReference model + reservation_profile_instance_profile_reference_model_json = {} + reservation_profile_instance_profile_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16' + reservation_profile_instance_profile_reference_model_json['name'] = 'bx2-4x16' + reservation_profile_instance_profile_reference_model_json['resource_type'] = 'instance_profile' + + # Construct a model instance of ReservationProfileInstanceProfileReference by calling from_dict on the json representation + reservation_profile_instance_profile_reference_model = ReservationProfileInstanceProfileReference.from_dict(reservation_profile_instance_profile_reference_model_json) + assert reservation_profile_instance_profile_reference_model != False + + # Construct a model instance of ReservationProfileInstanceProfileReference by calling from_dict on the json representation + reservation_profile_instance_profile_reference_model_dict = ReservationProfileInstanceProfileReference.from_dict(reservation_profile_instance_profile_reference_model_json).__dict__ + reservation_profile_instance_profile_reference_model2 = ReservationProfileInstanceProfileReference(**reservation_profile_instance_profile_reference_model_dict) + + # Verify the model instances are equivalent + assert reservation_profile_instance_profile_reference_model == reservation_profile_instance_profile_reference_model2 + + # Convert model instance back to dict and verify no loss of data + reservation_profile_instance_profile_reference_model_json2 = reservation_profile_instance_profile_reference_model.to_dict() + assert reservation_profile_instance_profile_reference_model_json2 == reservation_profile_instance_profile_reference_model_json + + class TestModel_ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext: """ Test Class for ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext @@ -98575,56 +90670,26 @@ def test_reserved_ip_target_bare_metal_server_network_interface_reference_target # 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'] = ( - 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/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - ) - reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model_json['id'] = ( - '0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - ) - 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'] = 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/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' + reserved_ip_target_bare_metal_server_network_interface_reference_target_context_model_json['id'] = '0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_ReservedIPTargetEndpointGatewayReference: @@ -98644,44 +90709,27 @@ def test_reserved_ip_target_endpoint_gateway_reference_serialization(self): # 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' reserved_ip_target_endpoint_gateway_reference_model_json['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' + reserved_ip_target_endpoint_gateway_reference_model_json['id'] = 'r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' 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 - ) + 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() - ) - assert ( - reserved_ip_target_endpoint_gateway_reference_model_json2 - == reserved_ip_target_endpoint_gateway_reference_model_json - ) + 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 class TestModel_ReservedIPTargetGenericResourceReference: @@ -98701,39 +90749,24 @@ def test_reserved_ip_target_generic_resource_reference_serialization(self): # 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['crn'] = 'crn:v1:bluemix:public:containers-kubernetes:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34:9qtrw1peys2spdfs7agb::' reserved_ip_target_generic_resource_reference_model_json['deleted'] = 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 - ) + 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() - ) - assert ( - reserved_ip_target_generic_resource_reference_model_json2 - == reserved_ip_target_generic_resource_reference_model_json - ) + 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 class TestModel_ReservedIPTargetLoadBalancerReference: @@ -98753,42 +90786,27 @@ def test_reserved_ip_target_load_balancer_reference_serialization(self): # 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727' reserved_ip_target_load_balancer_reference_model_json['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + reserved_ip_target_load_balancer_reference_model_json['id'] = 'r006-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() - ) - assert ( - reserved_ip_target_load_balancer_reference_model_json2 - == reserved_ip_target_load_balancer_reference_model_json - ) + 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 class TestModel_ReservedIPTargetNetworkInterfaceReferenceTargetContext: @@ -98809,51 +90827,25 @@ def test_reserved_ip_target_network_interface_reference_target_context_serializa # 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'] = deleted_model - reserved_ip_target_network_interface_reference_target_context_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - ) - reserved_ip_target_network_interface_reference_target_context_model_json['id'] = ( - '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - ) - 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' + reserved_ip_target_network_interface_reference_target_context_model_json['id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' + 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 - ) + 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() - ) - assert ( - reserved_ip_target_network_interface_reference_target_context_model_json2 - == reserved_ip_target_network_interface_reference_target_context_model_json - ) + 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 class TestModel_ReservedIPTargetVPNGatewayReference: @@ -98873,39 +90865,27 @@ def test_reserved_ip_target_vpn_gateway_reference_serialization(self): # 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['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'] = 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['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() - assert ( - reserved_ip_target_vpn_gateway_reference_model_json2 == reserved_ip_target_vpn_gateway_reference_model_json - ) + assert reserved_ip_target_vpn_gateway_reference_model_json2 == reserved_ip_target_vpn_gateway_reference_model_json class TestModel_ReservedIPTargetVPNServerReference: @@ -98925,30 +90905,20 @@ def test_reserved_ip_target_vpn_server_reference_serialization(self): # 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['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'] = 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['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 @@ -98970,56 +90940,26 @@ def test_reserved_ip_target_virtual_network_interface_reference_reserved_ip_targ # 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) - 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/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) - reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model_json['id'] = ( - '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) - 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + 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/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + reserved_ip_target_virtual_network_interface_reference_reserved_ip_target_context_model_json['id'] = '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_ResourceGroupIdentityById: @@ -99037,15 +90977,11 @@ def test_resource_group_identity_by_id_serialization(self): 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_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 @@ -99073,30 +91009,20 @@ def test_route_creator_vpn_gateway_reference_serialization(self): # 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b' route_creator_vpn_gateway_reference_model_json['deleted'] = 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['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 @@ -99123,30 +91049,20 @@ def test_route_creator_vpn_server_reference_serialization(self): # 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['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'] = 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['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' # 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 @@ -99204,43 +91120,25 @@ def test_route_next_hop_vpn_gateway_connection_reference_serialization(self): # 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'] = 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['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 - ) + 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() - ) - assert ( - route_next_hop_vpn_gateway_connection_reference_model_json2 - == route_next_hop_vpn_gateway_connection_reference_model_json - ) + 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 class TestModel_RoutingTableIdentityByCRN: @@ -99255,20 +91153,14 @@ def test_routing_table_identity_by_crn_serialization(self): # Construct a json representation of a RoutingTableIdentityByCRN model routing_table_identity_by_crn_model_json = {} - routing_table_identity_by_crn_model_json['crn'] = ( - 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' - ) + routing_table_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc-routing-table:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b/r006-6885e83f-03b2-4603-8a86-db2a0f55c840' # Construct a model instance of RoutingTableIdentityByCRN by calling from_dict on the json representation - routing_table_identity_by_crn_model = RoutingTableIdentityByCRN.from_dict( - routing_table_identity_by_crn_model_json - ) + routing_table_identity_by_crn_model = RoutingTableIdentityByCRN.from_dict(routing_table_identity_by_crn_model_json) assert routing_table_identity_by_crn_model != False # Construct a model instance of RoutingTableIdentityByCRN by calling from_dict on the json representation - routing_table_identity_by_crn_model_dict = RoutingTableIdentityByCRN.from_dict( - routing_table_identity_by_crn_model_json - ).__dict__ + routing_table_identity_by_crn_model_dict = RoutingTableIdentityByCRN.from_dict(routing_table_identity_by_crn_model_json).__dict__ routing_table_identity_by_crn_model2 = RoutingTableIdentityByCRN(**routing_table_identity_by_crn_model_dict) # Verify the model instances are equivalent @@ -99291,20 +91183,14 @@ 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_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 @@ -99334,9 +91220,7 @@ def test_routing_table_identity_by_id_serialization(self): 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_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 @@ -99359,20 +91243,14 @@ 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_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 @@ -99395,23 +91273,15 @@ 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 @@ -99436,15 +91306,11 @@ def test_security_group_identity_by_id_serialization(self): 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_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 @@ -99470,18 +91336,12 @@ def test_security_group_rule_local_patch_cidr_serialization(self): 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 @@ -99506,18 +91366,12 @@ 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 @@ -99542,27 +91396,19 @@ def test_security_group_rule_local_prototype_cidr_serialization(self): 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() - assert ( - security_group_rule_local_prototype_cidr_model_json2 == security_group_rule_local_prototype_cidr_model_json - ) + assert security_group_rule_local_prototype_cidr_model_json2 == security_group_rule_local_prototype_cidr_model_json class TestModel_SecurityGroupRuleLocalPrototypeIP: @@ -99580,18 +91426,12 @@ def test_security_group_rule_local_prototype_ip_serialization(self): 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 @@ -99616,15 +91456,11 @@ def test_security_group_rule_local_cidr_serialization(self): 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_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 @@ -99654,9 +91490,7 @@ def test_security_group_rule_local_ip_serialization(self): 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_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 @@ -99689,48 +91523,24 @@ def test_security_group_rule_prototype_security_group_rule_protocol_all_serializ 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['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['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 - ) + 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() - ) - assert ( - security_group_rule_prototype_security_group_rule_protocol_all_model_json2 - == security_group_rule_prototype_security_group_rule_protocol_all_model_json - ) + 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 class TestModel_SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP: @@ -99756,49 +91566,25 @@ def test_security_group_rule_prototype_security_group_rule_protocol_icmp_seriali 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['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['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 - ) + 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() - ) - assert ( - security_group_rule_prototype_security_group_rule_protocol_icmp_model_json2 - == security_group_rule_prototype_security_group_rule_protocol_icmp_model_json - ) + 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 class TestModel_SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP: @@ -99823,50 +91609,26 @@ def test_security_group_rule_prototype_security_group_rule_protocol_tcpudp_seria 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['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'] = 'tcp' - 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['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 - ) + 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() - ) - assert ( - security_group_rule_prototype_security_group_rule_protocol_tcpudp_model_json2 - == security_group_rule_prototype_security_group_rule_protocol_tcpudp_model_json - ) + 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 class TestModel_SecurityGroupRuleRemotePatchCIDR: @@ -99884,18 +91646,12 @@ def test_security_group_rule_remote_patch_cidr_serialization(self): 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 @@ -99920,18 +91676,12 @@ def test_security_group_rule_remote_patch_ip_serialization(self): 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 @@ -99956,30 +91706,19 @@ def test_security_group_rule_remote_prototype_cidr_serialization(self): 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() - ) - assert ( - security_group_rule_remote_prototype_cidr_model_json2 - == security_group_rule_remote_prototype_cidr_model_json - ) + 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 class TestModel_SecurityGroupRuleRemotePrototypeIP: @@ -99997,18 +91736,12 @@ def test_security_group_rule_remote_prototype_ip_serialization(self): 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 @@ -100033,18 +91766,12 @@ def test_security_group_rule_remote_cidr_serialization(self): 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 @@ -100069,15 +91796,11 @@ 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_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 @@ -100105,50 +91828,26 @@ def test_security_group_rule_remote_security_group_reference_serialization(self) # 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['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'] = 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['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 - ) + 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() - ) - assert ( - security_group_rule_remote_security_group_reference_model_json2 - == security_group_rule_remote_security_group_reference_model_json - ) + 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 class TestModel_SecurityGroupRuleSecurityGroupRuleProtocolAll: @@ -100172,49 +91871,27 @@ 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/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a' - ) - security_group_rule_security_group_rule_protocol_all_model_json['id'] = ( - 'r006-6f2a6efe-21e2-401c-b237-620aa26ba16a' - ) + security_group_rule_security_group_rule_protocol_all_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a' + security_group_rule_security_group_rule_protocol_all_model_json['id'] = 'r006-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 - ) + 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() - ) - assert ( - security_group_rule_security_group_rule_protocol_all_model_json2 - == security_group_rule_security_group_rule_protocol_all_model_json - ) + 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 class TestModel_SecurityGroupRuleSecurityGroupRuleProtocolICMP: @@ -100238,12 +91915,8 @@ 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/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a' - ) - security_group_rule_security_group_rule_protocol_icmp_model_json['id'] = ( - 'r006-6f2a6efe-21e2-401c-b237-620aa26ba16a' - ) + security_group_rule_security_group_rule_protocol_icmp_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a' + security_group_rule_security_group_rule_protocol_icmp_model_json['id'] = 'r006-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 @@ -100252,37 +91925,19 @@ def test_security_group_rule_security_group_rule_protocol_icmp_serialization(sel 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 - ) + 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() - ) - assert ( - security_group_rule_security_group_rule_protocol_icmp_model_json2 - == security_group_rule_security_group_rule_protocol_icmp_model_json - ) + 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 class TestModel_SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP: @@ -100306,12 +91961,8 @@ 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/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a' - ) - security_group_rule_security_group_rule_protocol_tcpudp_model_json['id'] = ( - 'r006-6f2a6efe-21e2-401c-b237-620aa26ba16a' - ) + security_group_rule_security_group_rule_protocol_tcpudp_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/r006-be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/r006-6f2a6efe-21e2-401c-b237-620aa26ba16a' + security_group_rule_security_group_rule_protocol_tcpudp_model_json['id'] = 'r006-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 @@ -100320,39 +91971,19 @@ def test_security_group_rule_security_group_rule_protocol_tcpudp_serialization(s 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 - ) + 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() - ) - assert ( - security_group_rule_security_group_rule_protocol_tcpudp_model_json2 - == security_group_rule_security_group_rule_protocol_tcpudp_model_json - ) + 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 class TestModel_SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext: @@ -100360,9 +91991,7 @@ 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 """ @@ -100374,56 +92003,26 @@ def test_security_group_target_reference_bare_metal_server_network_interface_ref # 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' - ] = 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/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model_json[ - 'id' - ] = '0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - 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'] = 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/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' + security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model_json['id'] = '0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' + 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 - ) - ) - assert ( - security_group_target_reference_bare_metal_server_network_interface_reference_target_context_model != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_SecurityGroupTargetReferenceEndpointGatewayReference: @@ -100443,53 +92042,27 @@ def test_security_group_target_reference_endpoint_gateway_reference_serializatio # 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::endpoint-gateway:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' security_group_target_reference_endpoint_gateway_reference_model_json['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' + security_group_target_reference_endpoint_gateway_reference_model_json['id'] = 'r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' 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 - ) + 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() - ) - assert ( - security_group_target_reference_endpoint_gateway_reference_model_json2 - == security_group_target_reference_endpoint_gateway_reference_model_json - ) + 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 class TestModel_SecurityGroupTargetReferenceLoadBalancerReference: @@ -100509,53 +92082,27 @@ def test_security_group_target_reference_load_balancer_reference_serialization(s # 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::load-balancer:r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727' security_group_target_reference_load_balancer_reference_model_json['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727' + security_group_target_reference_load_balancer_reference_model_json['id'] = 'r006-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 - ) + 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() - ) - assert ( - security_group_target_reference_load_balancer_reference_model_json2 - == security_group_target_reference_load_balancer_reference_model_json - ) + 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 class TestModel_SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext: @@ -100576,53 +92123,25 @@ def test_security_group_target_reference_network_interface_reference_target_cont # 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'] = deleted_model - security_group_target_reference_network_interface_reference_target_context_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - ) - security_group_target_reference_network_interface_reference_target_context_model_json['id'] = ( - '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - ) - 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' + security_group_target_reference_network_interface_reference_target_context_model_json['id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' + 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 - ) + 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() - ) - assert ( - security_group_target_reference_network_interface_reference_target_context_model_json2 - == security_group_target_reference_network_interface_reference_target_context_model_json - ) + 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 class TestModel_SecurityGroupTargetReferenceVPNServerReference: @@ -100642,51 +92161,27 @@ def test_security_group_target_reference_vpn_server_reference_serialization(self # 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['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'] = 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['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 - ) + 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() - ) - assert ( - security_group_target_reference_vpn_server_reference_model_json2 - == security_group_target_reference_vpn_server_reference_model_json - ) + 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 class TestModel_SecurityGroupTargetReferenceVirtualNetworkInterfaceReference: @@ -100707,84 +92202,44 @@ def test_security_group_target_reference_virtual_network_interface_reference_ser reserved_ip_reference_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '10.0.1.5' reserved_ip_reference_model['deleted'] = deleted_model - reserved_ip_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/0717-6d353a0f-aeb1-4ae1-832e-1110d10981bb' - ) + reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0717-7ec86020-1c6e-4889-b3f0-a15f2e50f87e/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['name'] = 'my-reserved-ip-z1' reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip' 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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) + security_group_target_reference_virtual_network_interface_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::virtual-network-interface:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' security_group_target_reference_virtual_network_interface_reference_model_json['deleted'] = deleted_model - security_group_target_reference_virtual_network_interface_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) - security_group_target_reference_virtual_network_interface_reference_model_json['id'] = ( - '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' - ) - 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/virtual_network_interfaces/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + security_group_target_reference_virtual_network_interface_reference_model_json['id'] = '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + 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 - ) + 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() - ) - assert ( - security_group_target_reference_virtual_network_interface_reference_model_json2 - == security_group_target_reference_virtual_network_interface_reference_model_json - ) + 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: @@ -100816,48 +92271,28 @@ def test_share_accessor_binding_accessor_share_reference_serialization(self): # 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:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58' - ) + share_accessor_binding_accessor_share_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58' share_accessor_binding_accessor_share_reference_model_json['deleted'] = deleted_model - share_accessor_binding_accessor_share_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58' - ) + share_accessor_binding_accessor_share_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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 - ) + 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 - ) + 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 - ) + 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 - ) + 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: @@ -100872,47 +92307,23 @@ def test_share_accessor_binding_accessor_watsonx_machine_learning_reference_seri # 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' - ) + 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 - ) - ) + 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 - ) - ) + 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 - ) + 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 - ) + 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: @@ -100927,9 +92338,7 @@ 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:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58' - ) + share_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share:r006-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) @@ -100959,9 +92368,7 @@ 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/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58' - ) + share_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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) @@ -101021,16 +92428,12 @@ def test_share_mount_target_prototype_share_mount_target_by_access_control_mode_ # 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 = {} # 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' @@ -101044,72 +92447,38 @@ def test_share_mount_target_prototype_share_mount_target_by_access_control_mode_ 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 = {} # 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['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['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['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 - ) + 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() - ) - 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 - ) + 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 class TestModel_ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC: @@ -101129,50 +92498,24 @@ 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext: @@ -101180,25 +92523,19 @@ 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 = {} # 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' @@ -101213,75 +92550,32 @@ def test_share_mount_target_virtual_network_interface_prototype_virtual_network_ 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[ - '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 + 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['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 - ) - assert ( - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_prototype_share_mount_target_context_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_ShareProfileCapacityDependentRange: @@ -101302,18 +92596,12 @@ def test_share_profile_capacity_dependent_range_serialization(self): share_profile_capacity_dependent_range_model_json['type'] = 'dependent_range' # 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 @@ -101343,9 +92631,7 @@ def test_share_profile_capacity_enum_serialization(self): 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_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 @@ -101372,15 +92658,11 @@ 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_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 @@ -101410,15 +92692,11 @@ 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_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 @@ -101447,18 +92725,12 @@ def test_share_profile_iops_dependent_range_serialization(self): share_profile_iops_dependent_range_model_json['type'] = 'dependent_range' # 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 @@ -101520,9 +92792,7 @@ def test_share_profile_iops_fixed_serialization(self): 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_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 @@ -101556,9 +92826,7 @@ def test_share_profile_iops_range_serialization(self): 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_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 @@ -101581,20 +92849,14 @@ 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_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 @@ -101620,15 +92882,11 @@ 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_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 @@ -101651,16 +92909,12 @@ def test_share_prototype_share_by_origin_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 = {} # 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' @@ -101674,34 +92928,22 @@ def test_share_prototype_share_by_origin_share_serialization(self): 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 = {} # 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['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['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['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 = {} # 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' @@ -101733,18 +92975,12 @@ def test_share_prototype_share_by_origin_share_serialization(self): 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 - ) + 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 - ) + 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 @@ -101766,16 +93002,12 @@ 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 = {} # 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' @@ -101789,34 +93021,22 @@ def test_share_prototype_share_by_size_serialization(self): 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 = {} # 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['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['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['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 = {} # 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' @@ -101836,9 +93056,7 @@ def test_share_prototype_share_by_size_serialization(self): 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 @@ -101861,15 +93079,11 @@ def test_share_prototype_share_by_size_serialization(self): 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_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 @@ -101892,16 +93106,12 @@ 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 = {} # 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' @@ -101915,34 +93125,22 @@ def test_share_prototype_share_by_source_share_serialization(self): 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 = {} # 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['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['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['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 = {} # 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' @@ -101962,9 +93160,7 @@ def test_share_prototype_share_by_source_share_serialization(self): 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' @@ -101985,18 +93181,12 @@ def test_share_prototype_share_by_source_share_serialization(self): 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 @@ -102006,6 +93196,152 @@ def test_share_prototype_share_by_source_share_serialization(self): assert share_prototype_share_by_source_share_model_json2 == share_prototype_share_by_source_share_model_json +class TestModel_SharePrototypeShareBySourceSnapshot: + """ + Test Class for SharePrototypeShareBySourceSnapshot + """ + + def test_share_prototype_share_by_source_snapshot_serialization(self): + """ + Test serialization/deserialization for SharePrototypeShareBySourceSnapshot + """ + + # 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'] = 'r006-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 + + 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' + + share_initial_owner_model = {} # ShareInitialOwner + share_initial_owner_model['gid'] = 50 + share_initial_owner_model['uid'] = 50 + + share_source_snapshot_prototype_model = {} # ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityById + share_source_snapshot_prototype_model['id'] = 'r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4' + + # Construct a json representation of a SharePrototypeShareBySourceSnapshot model + share_prototype_share_by_source_snapshot_model_json = {} + share_prototype_share_by_source_snapshot_model_json['allowed_transit_encryption_modes'] = ['none'] + share_prototype_share_by_source_snapshot_model_json['mount_targets'] = [share_mount_target_prototype_model] + share_prototype_share_by_source_snapshot_model_json['name'] = 'my-share' + share_prototype_share_by_source_snapshot_model_json['replica_share'] = share_prototype_share_context_model + share_prototype_share_by_source_snapshot_model_json['user_tags'] = [] + share_prototype_share_by_source_snapshot_model_json['encryption_key'] = encryption_key_identity_model + share_prototype_share_by_source_snapshot_model_json['initial_owner'] = share_initial_owner_model + share_prototype_share_by_source_snapshot_model_json['iops'] = 100 + share_prototype_share_by_source_snapshot_model_json['profile'] = share_profile_identity_model + share_prototype_share_by_source_snapshot_model_json['resource_group'] = resource_group_identity_model + share_prototype_share_by_source_snapshot_model_json['size'] = 200 + share_prototype_share_by_source_snapshot_model_json['source_snapshot'] = share_source_snapshot_prototype_model + + # Construct a model instance of SharePrototypeShareBySourceSnapshot by calling from_dict on the json representation + share_prototype_share_by_source_snapshot_model = SharePrototypeShareBySourceSnapshot.from_dict(share_prototype_share_by_source_snapshot_model_json) + assert share_prototype_share_by_source_snapshot_model != False + + # Construct a model instance of SharePrototypeShareBySourceSnapshot by calling from_dict on the json representation + share_prototype_share_by_source_snapshot_model_dict = SharePrototypeShareBySourceSnapshot.from_dict(share_prototype_share_by_source_snapshot_model_json).__dict__ + share_prototype_share_by_source_snapshot_model2 = SharePrototypeShareBySourceSnapshot(**share_prototype_share_by_source_snapshot_model_dict) + + # Verify the model instances are equivalent + assert share_prototype_share_by_source_snapshot_model == share_prototype_share_by_source_snapshot_model2 + + # Convert model instance back to dict and verify no loss of data + share_prototype_share_by_source_snapshot_model_json2 = share_prototype_share_by_source_snapshot_model.to_dict() + assert share_prototype_share_by_source_snapshot_model_json2 == share_prototype_share_by_source_snapshot_model_json + + +class TestModel_ShareSourceSnapshotShareSnapshotReference: + """ + Test Class for ShareSourceSnapshotShareSnapshotReference + """ + + def test_share_source_snapshot_share_snapshot_reference_serialization(self): + """ + Test serialization/deserialization for ShareSourceSnapshotShareSnapshotReference + """ + + # Construct dict forms of any model objects needed in order to build this model. + + deleted_model = {} # Deleted + deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources' + + # Construct a json representation of a ShareSourceSnapshotShareSnapshotReference model + share_source_snapshot_share_snapshot_reference_model_json = {} + share_source_snapshot_share_snapshot_reference_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4' + share_source_snapshot_share_snapshot_reference_model_json['deleted'] = deleted_model + share_source_snapshot_share_snapshot_reference_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4' + share_source_snapshot_share_snapshot_reference_model_json['id'] = 'r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4' + share_source_snapshot_share_snapshot_reference_model_json['name'] = 'my-share-snapshot' + share_source_snapshot_share_snapshot_reference_model_json['resource_type'] = 'share_snapshot' + + # Construct a model instance of ShareSourceSnapshotShareSnapshotReference by calling from_dict on the json representation + share_source_snapshot_share_snapshot_reference_model = ShareSourceSnapshotShareSnapshotReference.from_dict(share_source_snapshot_share_snapshot_reference_model_json) + assert share_source_snapshot_share_snapshot_reference_model != False + + # Construct a model instance of ShareSourceSnapshotShareSnapshotReference by calling from_dict on the json representation + share_source_snapshot_share_snapshot_reference_model_dict = ShareSourceSnapshotShareSnapshotReference.from_dict(share_source_snapshot_share_snapshot_reference_model_json).__dict__ + share_source_snapshot_share_snapshot_reference_model2 = ShareSourceSnapshotShareSnapshotReference(**share_source_snapshot_share_snapshot_reference_model_dict) + + # Verify the model instances are equivalent + assert share_source_snapshot_share_snapshot_reference_model == share_source_snapshot_share_snapshot_reference_model2 + + # Convert model instance back to dict and verify no loss of data + share_source_snapshot_share_snapshot_reference_model_json2 = share_source_snapshot_share_snapshot_reference_model.to_dict() + assert share_source_snapshot_share_snapshot_reference_model_json2 == share_source_snapshot_share_snapshot_reference_model_json + + class TestModel_SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots: """ Test Class for SnapshotConsistencyGroupPrototypeSnapshotConsistencyGroupBySnapshots @@ -102024,62 +93360,32 @@ def test_snapshot_consistency_group_prototype_snapshot_consistency_group_by_snap 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 = {} # 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 - ) + 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() - ) - assert ( - snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model_json2 - == snapshot_consistency_group_prototype_snapshot_consistency_group_by_snapshots_model_json - ) + 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 class TestModel_SnapshotIdentityByCRN: @@ -102094,18 +93400,14 @@ 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) 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_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 @@ -102128,18 +93430,14 @@ 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) 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_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 @@ -102202,14 +93500,10 @@ 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 = {} @@ -102221,33 +93515,19 @@ def test_snapshot_prototype_snapshot_by_source_snapshot_serialization(self): 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 - ) + 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() - ) - assert ( - snapshot_prototype_snapshot_by_source_snapshot_model_json2 - == snapshot_prototype_snapshot_by_source_snapshot_model_json - ) + 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 class TestModel_SnapshotPrototypeSnapshotBySourceVolume: @@ -102283,30 +93563,19 @@ def test_snapshot_prototype_snapshot_by_source_volume_serialization(self): 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() - ) - assert ( - snapshot_prototype_snapshot_by_source_volume_model_json2 - == snapshot_prototype_snapshot_by_source_volume_model_json - ) + 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 class TestModel_SubnetIdentityByCRN: @@ -102321,9 +93590,7 @@ 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) @@ -102353,9 +93620,7 @@ 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) @@ -102419,7 +93684,7 @@ def test_subnet_prototype_subnet_by_cidr_serialization(self): 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['id'] = 'r006-dc5431ef-1fc6-4861-adc9-a59d077d1241' resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' @@ -102446,18 +93711,12 @@ def test_subnet_prototype_subnet_by_cidr_serialization(self): 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 @@ -102483,7 +93742,7 @@ def test_subnet_prototype_subnet_by_total_count_serialization(self): 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['id'] = 'r006-dc5431ef-1fc6-4861-adc9-a59d077d1241' resource_group_identity_model = {} # ResourceGroupIdentityById resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345' @@ -102510,18 +93769,12 @@ def test_subnet_prototype_subnet_by_total_count_serialization(self): 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 @@ -102543,44 +93796,22 @@ def test_subnet_public_gateway_patch_public_gateway_identity_by_crn_serializatio # 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:r006-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 - ) + 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() - ) - assert ( - subnet_public_gateway_patch_public_gateway_identity_by_crn_model_json2 - == subnet_public_gateway_patch_public_gateway_identity_by_crn_model_json - ) + 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 class TestModel_SubnetPublicGatewayPatchPublicGatewayIdentityByHref: @@ -102595,44 +93826,22 @@ def test_subnet_public_gateway_patch_public_gateway_identity_by_href_serializati # 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/r006-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 - ) + 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() - ) - assert ( - subnet_public_gateway_patch_public_gateway_identity_by_href_model_json2 - == subnet_public_gateway_patch_public_gateway_identity_by_href_model_json - ) + 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 class TestModel_SubnetPublicGatewayPatchPublicGatewayIdentityById: @@ -102647,44 +93856,22 @@ def test_subnet_public_gateway_patch_public_gateway_identity_by_id_serialization # 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'] = 'r006-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 - ) + 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() - ) - assert ( - subnet_public_gateway_patch_public_gateway_identity_by_id_model_json2 - == subnet_public_gateway_patch_public_gateway_identity_by_id_model_json - ) + 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 class TestModel_TrustedProfileIdentityByCRN: @@ -102699,23 +93886,15 @@ def test_trusted_profile_identity_by_crn_serialization(self): # Construct a json representation of a TrustedProfileIdentityByCRN model trusted_profile_identity_by_crn_model_json = {} - trusted_profile_identity_by_crn_model_json['crn'] = ( - 'crn:v1:bluemix:public:iam-identity::a/aa2432b1fa4d4ace891e9b80fc104e34::profile:Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' - ) + trusted_profile_identity_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 TrustedProfileIdentityByCRN by calling from_dict on the json representation - trusted_profile_identity_by_crn_model = TrustedProfileIdentityByCRN.from_dict( - trusted_profile_identity_by_crn_model_json - ) + trusted_profile_identity_by_crn_model = TrustedProfileIdentityByCRN.from_dict(trusted_profile_identity_by_crn_model_json) assert trusted_profile_identity_by_crn_model != False # Construct a model instance of TrustedProfileIdentityByCRN by calling from_dict on the json representation - trusted_profile_identity_by_crn_model_dict = TrustedProfileIdentityByCRN.from_dict( - trusted_profile_identity_by_crn_model_json - ).__dict__ - trusted_profile_identity_by_crn_model2 = TrustedProfileIdentityByCRN( - **trusted_profile_identity_by_crn_model_dict - ) + trusted_profile_identity_by_crn_model_dict = TrustedProfileIdentityByCRN.from_dict(trusted_profile_identity_by_crn_model_json).__dict__ + trusted_profile_identity_by_crn_model2 = TrustedProfileIdentityByCRN(**trusted_profile_identity_by_crn_model_dict) # Verify the model instances are equivalent assert trusted_profile_identity_by_crn_model == trusted_profile_identity_by_crn_model2 @@ -102740,15 +93919,11 @@ def test_trusted_profile_identity_by_id_serialization(self): trusted_profile_identity_by_id_model_json['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5' # Construct a model instance of TrustedProfileIdentityById by calling from_dict on the json representation - trusted_profile_identity_by_id_model = TrustedProfileIdentityById.from_dict( - trusted_profile_identity_by_id_model_json - ) + trusted_profile_identity_by_id_model = TrustedProfileIdentityById.from_dict(trusted_profile_identity_by_id_model_json) assert trusted_profile_identity_by_id_model != False # Construct a model instance of TrustedProfileIdentityById by calling from_dict on the json representation - trusted_profile_identity_by_id_model_dict = TrustedProfileIdentityById.from_dict( - trusted_profile_identity_by_id_model_json - ).__dict__ + trusted_profile_identity_by_id_model_dict = TrustedProfileIdentityById.from_dict(trusted_profile_identity_by_id_model_json).__dict__ trusted_profile_identity_by_id_model2 = TrustedProfileIdentityById(**trusted_profile_identity_by_id_model_dict) # Verify the model instances are equivalent @@ -102780,45 +93955,23 @@ 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['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 - ) + 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() - ) - assert ( - vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_model_json2 - == vpcdns_resolver_prototype_vpcdns_resolver_type_manual_prototype_model_json - ) + 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 class TestModel_VPCDNSResolverPrototypeVPCDNSResolverTypeSystemPrototype: @@ -102836,39 +93989,19 @@ def test_vpcdns_resolver_prototype_vpcdns_resolver_type_system_prototype_seriali 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 - ) + 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() - ) - assert ( - vpcdns_resolver_prototype_vpcdns_resolver_type_system_prototype_model_json2 - == vpcdns_resolver_prototype_vpcdns_resolver_type_system_prototype_model_json - ) + 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 class TestModel_VPCDNSResolverTypeDelegated: @@ -102907,13 +94040,9 @@ def test_vpcdns_resolver_type_delegated_serialization(self): 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['crn'] = 'crn:v1:bluemix:public:is:us-south:a/aa2432b1fa4d4ace891e9b80fc104e34::vpc:r006-4727d842-f94f-4a2d-824a-9bc9b02c523b' vpc_reference_dns_resolver_context_model['deleted'] = 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['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 @@ -102926,15 +94055,11 @@ def test_vpcdns_resolver_type_delegated_serialization(self): 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_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 @@ -102976,9 +94101,7 @@ def test_vpcdns_resolver_type_manual_serialization(self): 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_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 @@ -103020,9 +94143,7 @@ def test_vpcdns_resolver_type_system_serialization(self): 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_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 @@ -103045,37 +94166,22 @@ 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 - ) + 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() - ) - assert ( - vpcdns_resolver_vpc_patch_vpc_identity_by_crn_model_json2 - == vpcdns_resolver_vpc_patch_vpc_identity_by_crn_model_json - ) + 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 class TestModel_VPCDNSResolverVPCPatchVPCIdentityByHref: @@ -103090,38 +94196,22 @@ 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 - ) + 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() - ) - assert ( - vpcdns_resolver_vpc_patch_vpc_identity_by_href_model_json2 - == vpcdns_resolver_vpc_patch_vpc_identity_by_href_model_json - ) + 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 class TestModel_VPCDNSResolverVPCPatchVPCIdentityById: @@ -103139,30 +94229,19 @@ def test_vpcdns_resolver_vpc_patch_vpc_identity_by_id_serialization(self): 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() - ) - assert ( - vpcdns_resolver_vpc_patch_vpc_identity_by_id_model_json2 - == vpcdns_resolver_vpc_patch_vpc_identity_by_id_model_json - ) + 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 class TestModel_VPCIdentityByCRN: @@ -103177,9 +94256,7 @@ 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) @@ -103209,9 +94286,7 @@ 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) @@ -103271,47 +94346,23 @@ def test_vpn_gateway_connection_ike_identity_prototype_vpn_gateway_connection_ik # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityHostname: @@ -103319,56 +94370,30 @@ 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityIPv4: @@ -103376,56 +94401,30 @@ 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityKeyID: @@ -103433,56 +94432,30 @@ 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN: @@ -103498,44 +94471,22 @@ def test_vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity # 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['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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityHostname: @@ -103551,44 +94502,22 @@ def test_vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity # 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['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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityIPv4: @@ -103604,44 +94533,22 @@ def test_vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity # 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['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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityKeyID: @@ -103657,44 +94564,22 @@ def test_vpn_gateway_connection_ike_identity_vpn_gateway_connection_ike_identity # 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['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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref: @@ -103709,44 +94594,22 @@ def test_vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_href_ser # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById: @@ -103761,44 +94624,22 @@ def test_vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_id_seria # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref: @@ -103813,44 +94654,22 @@ def test_vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_href # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById: @@ -103865,44 +94684,22 @@ def test_vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_id_s # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref: @@ -103917,44 +94714,22 @@ def test_vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_hr # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById: @@ -103969,44 +94744,22 @@ def test_vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_id # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref: @@ -104021,44 +94774,22 @@ def test_vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_b # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById: @@ -104073,44 +94804,22 @@ def test_vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_b # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNGatewayConnectionPolicyMode: @@ -104135,34 +94844,24 @@ def test_vpn_gateway_connection_policy_mode_serialization(self): ike_policy_reference_model = {} # IKEPolicyReference ike_policy_reference_model['deleted'] = 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['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_model = {} # IPsecPolicyReference i_psec_policy_reference_model['deleted'] = 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['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_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 = {} # VPNGatewayConnectionIKEIdentityVPNGatewayConnectionIKEIdentityFQDN vpn_gateway_connection_ike_identity_model['type'] = 'fqdn' vpn_gateway_connection_ike_identity_model['value'] = 'my-service.example.com' @@ -104170,9 +94869,7 @@ def test_vpn_gateway_connection_policy_mode_serialization(self): 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 = {} # 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' @@ -104185,9 +94882,7 @@ def test_vpn_gateway_connection_policy_mode_serialization(self): 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['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 @@ -104201,18 +94896,12 @@ def test_vpn_gateway_connection_policy_mode_serialization(self): 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 @@ -104227,67 +94916,37 @@ 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' # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNGatewayConnectionPolicyModePeerPrototypeVPNGatewayConnectionPeerByFQDN: @@ -104302,58 +94961,30 @@ def test_vpn_gateway_connection_policy_mode_peer_prototype_vpn_gateway_connectio # 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' # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByAddress: @@ -104368,59 +94999,31 @@ def test_vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_ # 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' # 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['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['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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFQDN: @@ -104435,59 +95038,31 @@ def test_vpn_gateway_connection_policy_mode_peer_vpn_gateway_connection_peer_by_ # 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' # 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['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['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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype: @@ -104507,101 +95082,51 @@ def test_vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_pro 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 = {} # 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 = {} # 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'] = ['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_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 = {} # 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['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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype: @@ -104621,107 +95146,51 @@ def test_vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mo 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 = {} # 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 = {} # 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_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 = {} # 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[ - 'distribute_traffic' - ] = False - 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['distribute_traffic'] = False + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress: @@ -104729,61 +95198,36 @@ 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' # 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 - ) - assert ( - vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_address_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByFQDN: @@ -104791,66 +95235,36 @@ 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' # 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 - ) - ) - assert ( - vpn_gateway_connection_static_route_mode_peer_prototype_vpn_gateway_connection_peer_by_fqdn_model != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByAddress: @@ -104865,58 +95279,30 @@ def test_vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_pe # 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' # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNGatewayConnectionStaticRouteModePeerVPNGatewayConnectionPeerByFQDN: @@ -104931,56 +95317,30 @@ def test_vpn_gateway_connection_static_route_mode_peer_vpn_gateway_connection_pe # 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' # 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['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['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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNGatewayPolicyMode: @@ -105000,9 +95360,7 @@ def test_vpn_gateway_policy_mode_serialization(self): vpn_gateway_connection_reference_model = {} # VPNGatewayConnectionReference vpn_gateway_connection_reference_model['deleted'] = 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['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' @@ -105014,31 +95372,23 @@ def test_vpn_gateway_policy_mode_serialization(self): 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['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['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['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_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' reserved_ip_reference_model['deleted'] = 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['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' @@ -105056,32 +95406,22 @@ def test_vpn_gateway_policy_mode_serialization(self): 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['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_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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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_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'] = 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' @@ -105090,14 +95430,10 @@ def test_vpn_gateway_policy_mode_serialization(self): 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['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['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' @@ -105146,46 +95482,24 @@ def test_vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_serialization(s # 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['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 - ) + 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() - ) - assert ( - vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model_json2 - == vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_model_json - ) + 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 class TestModel_VPNGatewayPrototypeVPNGatewayRouteModePrototype: @@ -105209,44 +95523,24 @@ def test_vpn_gateway_prototype_vpn_gateway_route_mode_prototype_serialization(se # 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['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 - ) + 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() - ) - assert ( - vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model_json2 - == vpn_gateway_prototype_vpn_gateway_route_mode_prototype_model_json - ) + 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 class TestModel_VPNGatewayRouteMode: @@ -105266,9 +95560,7 @@ def test_vpn_gateway_route_mode_serialization(self): vpn_gateway_connection_reference_model = {} # VPNGatewayConnectionReference vpn_gateway_connection_reference_model['deleted'] = 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['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' @@ -105280,31 +95572,23 @@ def test_vpn_gateway_route_mode_serialization(self): 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['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['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['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_model = {} # ReservedIPReference reserved_ip_reference_model['address'] = '192.168.3.4' reserved_ip_reference_model['deleted'] = 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['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' @@ -105322,32 +95606,22 @@ def test_vpn_gateway_route_mode_serialization(self): 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['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_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'] = deleted_model - subnet_reference_model['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/subnets/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_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'] = 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' @@ -105356,14 +95630,10 @@ def test_vpn_gateway_route_mode_serialization(self): vpn_gateway_route_mode_model_json = {} 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['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['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' @@ -105404,9 +95674,7 @@ 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['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 = {} @@ -105415,27 +95683,19 @@ def test_vpn_server_authentication_by_certificate_serialization(self): 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() - assert ( - vpn_server_authentication_by_certificate_model_json2 == vpn_server_authentication_by_certificate_model_json - ) + assert vpn_server_authentication_by_certificate_model_json2 == vpn_server_authentication_by_certificate_model_json class TestModel_VPNServerAuthenticationByUsername: @@ -105456,23 +95716,15 @@ def test_vpn_server_authentication_by_username_serialization(self): # 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['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 @@ -105497,39 +95749,19 @@ def test_vpn_server_authentication_by_username_id_provider_by_iam_serialization( 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 - ) + 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() - ) - assert ( - vpn_server_authentication_by_username_id_provider_by_iam_model_json2 - == vpn_server_authentication_by_username_id_provider_by_iam_model_json - ) + 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 class TestModel_VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype: @@ -105545,56 +95777,28 @@ def test_vpn_server_authentication_prototype_vpn_server_authentication_by_certif # 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['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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype: @@ -105614,47 +95818,23 @@ def test_vpn_server_authentication_prototype_vpn_server_authentication_by_userna # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VirtualNetworkInterfaceIPPrototypeReservedIPPrototypeVirtualNetworkInterfaceIPsContext: @@ -105662,58 +95842,31 @@ 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 = {} + 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 - ) - assert ( - virtual_network_interface_ip_prototype_reserved_ip_prototype_virtual_network_interface_i_ps_context_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext: @@ -105721,58 +95874,31 @@ 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 = {} + 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 - ) - assert ( - virtual_network_interface_primary_ip_prototype_reserved_ip_prototype_virtual_network_interface_primary_ip_context_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VirtualNetworkInterfaceTargetBareMetalServerNetworkAttachmentReferenceVirtualNetworkInterfaceContext: @@ -105780,61 +95906,32 @@ 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/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' - virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model_json[ - 'id' - ] = '0717-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 = {} + 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/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_attachments/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' + virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model_json['id'] = '0717-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 - ) - assert ( - virtual_network_interface_target_bare_metal_server_network_attachment_reference_virtual_network_interface_context_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VirtualNetworkInterfaceTargetInstanceNetworkAttachmentReferenceVirtualNetworkInterfaceContext: @@ -105842,61 +95939,32 @@ 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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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 = {} + virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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 - ) - assert ( - virtual_network_interface_target_instance_network_attachment_reference_virtual_network_interface_context_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VirtualNetworkInterfaceTargetShareMountTargetReference: @@ -105917,49 +95985,25 @@ def test_virtual_network_interface_target_share_mount_target_reference_serializa # 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'] = deleted_model - virtual_network_interface_target_share_mount_target_reference_model_json['href'] = ( - 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-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 - ) + 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() - ) - assert ( - virtual_network_interface_target_share_mount_target_reference_model_json2 - == virtual_network_interface_target_share_mount_target_reference_model_json - ) + 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 class TestModel_VolumeIdentityByCRN: @@ -105974,9 +96018,7 @@ 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) @@ -106006,9 +96048,7 @@ 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) @@ -106074,30 +96114,19 @@ def test_volume_profile_boot_capacity_dependent_range_serialization(self): volume_profile_boot_capacity_dependent_range_model_json['type'] = 'dependent_range' # Construct a model instance of VolumeProfileBootCapacityDependentRange by calling from_dict on the json representation - volume_profile_boot_capacity_dependent_range_model = VolumeProfileBootCapacityDependentRange.from_dict( - volume_profile_boot_capacity_dependent_range_model_json - ) + volume_profile_boot_capacity_dependent_range_model = VolumeProfileBootCapacityDependentRange.from_dict(volume_profile_boot_capacity_dependent_range_model_json) assert volume_profile_boot_capacity_dependent_range_model != False # Construct a model instance of VolumeProfileBootCapacityDependentRange by calling from_dict on the json representation - volume_profile_boot_capacity_dependent_range_model_dict = VolumeProfileBootCapacityDependentRange.from_dict( - volume_profile_boot_capacity_dependent_range_model_json - ).__dict__ - volume_profile_boot_capacity_dependent_range_model2 = VolumeProfileBootCapacityDependentRange( - **volume_profile_boot_capacity_dependent_range_model_dict - ) + volume_profile_boot_capacity_dependent_range_model_dict = VolumeProfileBootCapacityDependentRange.from_dict(volume_profile_boot_capacity_dependent_range_model_json).__dict__ + volume_profile_boot_capacity_dependent_range_model2 = VolumeProfileBootCapacityDependentRange(**volume_profile_boot_capacity_dependent_range_model_dict) # Verify the model instances are equivalent assert volume_profile_boot_capacity_dependent_range_model == volume_profile_boot_capacity_dependent_range_model2 # Convert model instance back to dict and verify no loss of data - volume_profile_boot_capacity_dependent_range_model_json2 = ( - volume_profile_boot_capacity_dependent_range_model.to_dict() - ) - assert ( - volume_profile_boot_capacity_dependent_range_model_json2 - == volume_profile_boot_capacity_dependent_range_model_json - ) + volume_profile_boot_capacity_dependent_range_model_json2 = volume_profile_boot_capacity_dependent_range_model.to_dict() + assert volume_profile_boot_capacity_dependent_range_model_json2 == volume_profile_boot_capacity_dependent_range_model_json class TestModel_VolumeProfileBootCapacityEnum: @@ -106117,18 +96146,12 @@ def test_volume_profile_boot_capacity_enum_serialization(self): volume_profile_boot_capacity_enum_model_json['values'] = [4800, 9600, 16000, 32000] # Construct a model instance of VolumeProfileBootCapacityEnum by calling from_dict on the json representation - volume_profile_boot_capacity_enum_model = VolumeProfileBootCapacityEnum.from_dict( - volume_profile_boot_capacity_enum_model_json - ) + volume_profile_boot_capacity_enum_model = VolumeProfileBootCapacityEnum.from_dict(volume_profile_boot_capacity_enum_model_json) assert volume_profile_boot_capacity_enum_model != False # Construct a model instance of VolumeProfileBootCapacityEnum by calling from_dict on the json representation - volume_profile_boot_capacity_enum_model_dict = VolumeProfileBootCapacityEnum.from_dict( - volume_profile_boot_capacity_enum_model_json - ).__dict__ - volume_profile_boot_capacity_enum_model2 = VolumeProfileBootCapacityEnum( - **volume_profile_boot_capacity_enum_model_dict - ) + volume_profile_boot_capacity_enum_model_dict = VolumeProfileBootCapacityEnum.from_dict(volume_profile_boot_capacity_enum_model_json).__dict__ + volume_profile_boot_capacity_enum_model2 = VolumeProfileBootCapacityEnum(**volume_profile_boot_capacity_enum_model_dict) # Verify the model instances are equivalent assert volume_profile_boot_capacity_enum_model == volume_profile_boot_capacity_enum_model2 @@ -106154,18 +96177,12 @@ def test_volume_profile_boot_capacity_fixed_serialization(self): volume_profile_boot_capacity_fixed_model_json['value'] = 4800 # Construct a model instance of VolumeProfileBootCapacityFixed by calling from_dict on the json representation - volume_profile_boot_capacity_fixed_model = VolumeProfileBootCapacityFixed.from_dict( - volume_profile_boot_capacity_fixed_model_json - ) + volume_profile_boot_capacity_fixed_model = VolumeProfileBootCapacityFixed.from_dict(volume_profile_boot_capacity_fixed_model_json) assert volume_profile_boot_capacity_fixed_model != False # Construct a model instance of VolumeProfileBootCapacityFixed by calling from_dict on the json representation - volume_profile_boot_capacity_fixed_model_dict = VolumeProfileBootCapacityFixed.from_dict( - volume_profile_boot_capacity_fixed_model_json - ).__dict__ - volume_profile_boot_capacity_fixed_model2 = VolumeProfileBootCapacityFixed( - **volume_profile_boot_capacity_fixed_model_dict - ) + volume_profile_boot_capacity_fixed_model_dict = VolumeProfileBootCapacityFixed.from_dict(volume_profile_boot_capacity_fixed_model_json).__dict__ + volume_profile_boot_capacity_fixed_model2 = VolumeProfileBootCapacityFixed(**volume_profile_boot_capacity_fixed_model_dict) # Verify the model instances are equivalent assert volume_profile_boot_capacity_fixed_model == volume_profile_boot_capacity_fixed_model2 @@ -106194,18 +96211,12 @@ def test_volume_profile_boot_capacity_range_serialization(self): volume_profile_boot_capacity_range_model_json['type'] = 'range' # Construct a model instance of VolumeProfileBootCapacityRange by calling from_dict on the json representation - volume_profile_boot_capacity_range_model = VolumeProfileBootCapacityRange.from_dict( - volume_profile_boot_capacity_range_model_json - ) + volume_profile_boot_capacity_range_model = VolumeProfileBootCapacityRange.from_dict(volume_profile_boot_capacity_range_model_json) assert volume_profile_boot_capacity_range_model != False # Construct a model instance of VolumeProfileBootCapacityRange by calling from_dict on the json representation - volume_profile_boot_capacity_range_model_dict = VolumeProfileBootCapacityRange.from_dict( - volume_profile_boot_capacity_range_model_json - ).__dict__ - volume_profile_boot_capacity_range_model2 = VolumeProfileBootCapacityRange( - **volume_profile_boot_capacity_range_model_dict - ) + volume_profile_boot_capacity_range_model_dict = VolumeProfileBootCapacityRange.from_dict(volume_profile_boot_capacity_range_model_json).__dict__ + volume_profile_boot_capacity_range_model2 = VolumeProfileBootCapacityRange(**volume_profile_boot_capacity_range_model_dict) # Verify the model instances are equivalent assert volume_profile_boot_capacity_range_model == volume_profile_boot_capacity_range_model2 @@ -106233,18 +96244,12 @@ def test_volume_profile_capacity_dependent_range_serialization(self): volume_profile_capacity_dependent_range_model_json['type'] = 'dependent_range' # Construct a model instance of VolumeProfileCapacityDependentRange by calling from_dict on the json representation - volume_profile_capacity_dependent_range_model = VolumeProfileCapacityDependentRange.from_dict( - volume_profile_capacity_dependent_range_model_json - ) + volume_profile_capacity_dependent_range_model = VolumeProfileCapacityDependentRange.from_dict(volume_profile_capacity_dependent_range_model_json) assert volume_profile_capacity_dependent_range_model != False # Construct a model instance of VolumeProfileCapacityDependentRange by calling from_dict on the json representation - volume_profile_capacity_dependent_range_model_dict = VolumeProfileCapacityDependentRange.from_dict( - volume_profile_capacity_dependent_range_model_json - ).__dict__ - volume_profile_capacity_dependent_range_model2 = VolumeProfileCapacityDependentRange( - **volume_profile_capacity_dependent_range_model_dict - ) + volume_profile_capacity_dependent_range_model_dict = VolumeProfileCapacityDependentRange.from_dict(volume_profile_capacity_dependent_range_model_json).__dict__ + volume_profile_capacity_dependent_range_model2 = VolumeProfileCapacityDependentRange(**volume_profile_capacity_dependent_range_model_dict) # Verify the model instances are equivalent assert volume_profile_capacity_dependent_range_model == volume_profile_capacity_dependent_range_model2 @@ -106271,15 +96276,11 @@ def test_volume_profile_capacity_enum_serialization(self): volume_profile_capacity_enum_model_json['values'] = [4800, 9600, 16000, 32000] # Construct a model instance of VolumeProfileCapacityEnum by calling from_dict on the json representation - volume_profile_capacity_enum_model = VolumeProfileCapacityEnum.from_dict( - volume_profile_capacity_enum_model_json - ) + volume_profile_capacity_enum_model = VolumeProfileCapacityEnum.from_dict(volume_profile_capacity_enum_model_json) assert volume_profile_capacity_enum_model != False # Construct a model instance of VolumeProfileCapacityEnum by calling from_dict on the json representation - volume_profile_capacity_enum_model_dict = VolumeProfileCapacityEnum.from_dict( - volume_profile_capacity_enum_model_json - ).__dict__ + volume_profile_capacity_enum_model_dict = VolumeProfileCapacityEnum.from_dict(volume_profile_capacity_enum_model_json).__dict__ volume_profile_capacity_enum_model2 = VolumeProfileCapacityEnum(**volume_profile_capacity_enum_model_dict) # Verify the model instances are equivalent @@ -106306,15 +96307,11 @@ def test_volume_profile_capacity_fixed_serialization(self): volume_profile_capacity_fixed_model_json['value'] = 4800 # Construct a model instance of VolumeProfileCapacityFixed by calling from_dict on the json representation - volume_profile_capacity_fixed_model = VolumeProfileCapacityFixed.from_dict( - volume_profile_capacity_fixed_model_json - ) + volume_profile_capacity_fixed_model = VolumeProfileCapacityFixed.from_dict(volume_profile_capacity_fixed_model_json) assert volume_profile_capacity_fixed_model != False # Construct a model instance of VolumeProfileCapacityFixed by calling from_dict on the json representation - volume_profile_capacity_fixed_model_dict = VolumeProfileCapacityFixed.from_dict( - volume_profile_capacity_fixed_model_json - ).__dict__ + volume_profile_capacity_fixed_model_dict = VolumeProfileCapacityFixed.from_dict(volume_profile_capacity_fixed_model_json).__dict__ volume_profile_capacity_fixed_model2 = VolumeProfileCapacityFixed(**volume_profile_capacity_fixed_model_dict) # Verify the model instances are equivalent @@ -106344,15 +96341,11 @@ def test_volume_profile_capacity_range_serialization(self): volume_profile_capacity_range_model_json['type'] = 'range' # Construct a model instance of VolumeProfileCapacityRange by calling from_dict on the json representation - volume_profile_capacity_range_model = VolumeProfileCapacityRange.from_dict( - volume_profile_capacity_range_model_json - ) + volume_profile_capacity_range_model = VolumeProfileCapacityRange.from_dict(volume_profile_capacity_range_model_json) assert volume_profile_capacity_range_model != False # Construct a model instance of VolumeProfileCapacityRange by calling from_dict on the json representation - volume_profile_capacity_range_model_dict = VolumeProfileCapacityRange.from_dict( - volume_profile_capacity_range_model_json - ).__dict__ + volume_profile_capacity_range_model_dict = VolumeProfileCapacityRange.from_dict(volume_profile_capacity_range_model_json).__dict__ volume_profile_capacity_range_model2 = VolumeProfileCapacityRange(**volume_profile_capacity_range_model_dict) # Verify the model instances are equivalent @@ -106381,18 +96374,12 @@ def test_volume_profile_iops_dependent_range_serialization(self): volume_profile_iops_dependent_range_model_json['type'] = 'dependent_range' # Construct a model instance of VolumeProfileIOPSDependentRange by calling from_dict on the json representation - volume_profile_iops_dependent_range_model = VolumeProfileIOPSDependentRange.from_dict( - volume_profile_iops_dependent_range_model_json - ) + volume_profile_iops_dependent_range_model = VolumeProfileIOPSDependentRange.from_dict(volume_profile_iops_dependent_range_model_json) assert volume_profile_iops_dependent_range_model != False # Construct a model instance of VolumeProfileIOPSDependentRange by calling from_dict on the json representation - volume_profile_iops_dependent_range_model_dict = VolumeProfileIOPSDependentRange.from_dict( - volume_profile_iops_dependent_range_model_json - ).__dict__ - volume_profile_iops_dependent_range_model2 = VolumeProfileIOPSDependentRange( - **volume_profile_iops_dependent_range_model_dict - ) + volume_profile_iops_dependent_range_model_dict = VolumeProfileIOPSDependentRange.from_dict(volume_profile_iops_dependent_range_model_json).__dict__ + volume_profile_iops_dependent_range_model2 = VolumeProfileIOPSDependentRange(**volume_profile_iops_dependent_range_model_dict) # Verify the model instances are equivalent assert volume_profile_iops_dependent_range_model == volume_profile_iops_dependent_range_model2 @@ -106423,9 +96410,7 @@ def test_volume_profile_iops_enum_serialization(self): assert volume_profile_iops_enum_model != False # Construct a model instance of VolumeProfileIOPSEnum by calling from_dict on the json representation - volume_profile_iops_enum_model_dict = VolumeProfileIOPSEnum.from_dict( - volume_profile_iops_enum_model_json - ).__dict__ + volume_profile_iops_enum_model_dict = VolumeProfileIOPSEnum.from_dict(volume_profile_iops_enum_model_json).__dict__ volume_profile_iops_enum_model2 = VolumeProfileIOPSEnum(**volume_profile_iops_enum_model_dict) # Verify the model instances are equivalent @@ -106456,9 +96441,7 @@ def test_volume_profile_iops_fixed_serialization(self): assert volume_profile_iops_fixed_model != False # Construct a model instance of VolumeProfileIOPSFixed by calling from_dict on the json representation - volume_profile_iops_fixed_model_dict = VolumeProfileIOPSFixed.from_dict( - volume_profile_iops_fixed_model_json - ).__dict__ + volume_profile_iops_fixed_model_dict = VolumeProfileIOPSFixed.from_dict(volume_profile_iops_fixed_model_json).__dict__ volume_profile_iops_fixed_model2 = VolumeProfileIOPSFixed(**volume_profile_iops_fixed_model_dict) # Verify the model instances are equivalent @@ -106492,9 +96475,7 @@ def test_volume_profile_iops_range_serialization(self): assert volume_profile_iops_range_model != False # Construct a model instance of VolumeProfileIOPSRange by calling from_dict on the json representation - volume_profile_iops_range_model_dict = VolumeProfileIOPSRange.from_dict( - volume_profile_iops_range_model_json - ).__dict__ + volume_profile_iops_range_model_dict = VolumeProfileIOPSRange.from_dict(volume_profile_iops_range_model_json).__dict__ volume_profile_iops_range_model2 = VolumeProfileIOPSRange(**volume_profile_iops_range_model_dict) # Verify the model instances are equivalent @@ -106517,23 +96498,15 @@ 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 @@ -106558,18 +96531,12 @@ 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 @@ -106601,9 +96568,7 @@ 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 = {} @@ -106617,18 +96582,12 @@ def test_volume_prototype_volume_by_capacity_serialization(self): 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 @@ -106660,9 +96619,7 @@ 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'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' @@ -106680,30 +96637,19 @@ def test_volume_prototype_volume_by_source_snapshot_serialization(self): 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() - ) - assert ( - volume_prototype_volume_by_source_snapshot_model_json2 - == volume_prototype_volume_by_source_snapshot_model_json - ) + 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 class TestModel_ZoneIdentityByHref: @@ -106718,9 +96664,7 @@ 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) @@ -106780,44 +96724,22 @@ def test_backup_policy_scope_prototype_enterprise_identity_enterprise_identity_b # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN: @@ -106825,52 +96747,29 @@ 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' # 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 - ) - assert ( - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref: @@ -106878,52 +96777,29 @@ 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/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + 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/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' # 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 - ) - assert ( - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_BareMetalServerNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById: @@ -106931,52 +96807,29 @@ 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' - ] = '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + 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'] = '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' # 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 - ) - assert ( - bare_metal_server_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref: @@ -106984,52 +96837,29 @@ class TestModel_ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetRes Test Class for ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref """ - def test_cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_serialization( - self, - ): + def test_cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_serialization(self): """ Test serialization/deserialization for ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref """ # Construct a json representation of a ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref model - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_model_json = ( - {} - ) - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_model_json[ - 'href' - ] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb' + cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_model_json = {} + cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/subnets/0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb' # Construct a model instance of ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref by calling from_dict on the json representation - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_model = ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref.from_dict( - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_model_json - ) - assert ( - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_model - != False - ) + cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_model = ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref.from_dict(cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_model_json) + assert cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_model != False # Construct a model instance of ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref by calling from_dict on the json representation - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_model_dict = ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref.from_dict( - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_model_json - ).__dict__ - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_model2 = ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref( - **cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_model_dict - ) + cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_model_dict = ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref.from_dict(cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_model_json).__dict__ + cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_model2 = ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextByHref(**cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_model_dict) # Verify the model instances are equivalent - assert ( - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_model - == cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_model2 - ) + assert cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_model == cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_model2 # Convert model instance back to dict and verify no loss of data - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_model_json2 = ( - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_model.to_dict() - ) - assert ( - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_model_json2 - == cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_model_json - ) + cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_model_json2 = cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_model.to_dict() + assert cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_model_json2 == cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_href_model_json class TestModel_ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById: @@ -107037,52 +96867,29 @@ class TestModel_ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetRes Test Class for ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById """ - def test_cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_serialization( - self, - ): + def test_cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_serialization(self): """ Test serialization/deserialization for ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById """ # Construct a json representation of a ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById model - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_model_json = ( - {} - ) - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_model_json[ - 'id' - ] = '6d353a0f-aeb1-4ae1-832e-1110d10981bb' + cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_model_json = {} + cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_model_json['id'] = '6d353a0f-aeb1-4ae1-832e-1110d10981bb' # Construct a model instance of ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById by calling from_dict on the json representation - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_model = ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById.from_dict( - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_model_json - ) - assert ( - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_model - != False - ) + cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_model = ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById.from_dict(cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_model_json) + assert cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_model != False # Construct a model instance of ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById by calling from_dict on the json representation - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_model_dict = ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById.from_dict( - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_model_json - ).__dict__ - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_model2 = ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById( - **cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_model_dict - ) + cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_model_dict = ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById.from_dict(cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_model_json).__dict__ + cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_model2 = ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPIdentityClusterNetworkInterfacePrimaryIPContextById(**cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_model_dict) # Verify the model instances are equivalent - assert ( - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_model - == cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_model2 - ) + assert cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_model == cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_model2 # Convert model instance back to dict and verify no loss of data - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_model_json2 = ( - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_model.to_dict() - ) - assert ( - cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_model_json2 - == cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_model_json - ) + cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_model_json2 = cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_model.to_dict() + assert cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_model_json2 == cluster_network_interface_primary_ip_prototype_cluster_network_subnet_reserved_ip_identity_cluster_network_interface_primary_ip_context_by_id_model_json class TestModel_EndpointGatewayReservedIPReservedIPIdentityByHref: @@ -107097,44 +96904,22 @@ def test_endpoint_gateway_reserved_ip_reserved_ip_identity_by_href_serialization # 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 - ) + 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() - ) - assert ( - endpoint_gateway_reserved_ip_reserved_ip_identity_by_href_model_json2 - == endpoint_gateway_reserved_ip_reserved_ip_identity_by_href_model_json - ) + 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 class TestModel_EndpointGatewayReservedIPReservedIPIdentityById: @@ -107149,44 +96934,22 @@ def test_endpoint_gateway_reserved_ip_reserved_ip_identity_by_id_serialization(s # 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 - ) + 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() - ) - assert ( - endpoint_gateway_reserved_ip_reserved_ip_identity_by_id_model_json2 - == endpoint_gateway_reserved_ip_reserved_ip_identity_by_id_model_json - ) + 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 class TestModel_FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref: @@ -107194,52 +96957,29 @@ 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/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' + 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/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' # 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 - ) - assert ( - floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_FloatingIPTargetPatchBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById: @@ -107247,52 +96987,29 @@ 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' - ] = '0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' + 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'] = '0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' # 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 - ) - assert ( - floating_ip_target_patch_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref: @@ -107307,44 +97024,22 @@ def test_floating_ip_target_patch_network_interface_identity_network_interface_i # 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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' - ) + floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById: @@ -107359,44 +97054,22 @@ def test_floating_ip_target_patch_network_interface_identity_network_interface_i # 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-d54eb633-98ea-459d-aa00-6a8e780175a7' - ) + floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model_json['id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN: @@ -107404,52 +97077,29 @@ 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' # 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 - ) - assert ( - floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref: @@ -107457,52 +97107,29 @@ 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/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + 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/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' # 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 - ) - assert ( - floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_FloatingIPTargetPatchVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById: @@ -107510,52 +97137,29 @@ 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' - ] = '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + 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'] = '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' # 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 - ) - assert ( - floating_ip_target_patch_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityByHref: @@ -107563,52 +97167,29 @@ 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/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' + 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/0717-aad10fd7-8a02-4f3e-97f3-b18bd82cf304/network_interfaces/0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' # 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 - ) - assert ( - floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_href_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_FloatingIPTargetPrototypeBareMetalServerNetworkInterfaceIdentityBareMetalServerNetworkInterfaceIdentityById: @@ -107616,52 +97197,29 @@ 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' - ] = '0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' + 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'] = '0717-da8c43ec-b6ca-4bd2-871e-72e288c66ee6' # 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 - ) - assert ( - floating_ip_target_prototype_bare_metal_server_network_interface_identity_bare_metal_server_network_interface_identity_by_id_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref: @@ -107669,53 +97227,29 @@ 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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' + floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById: @@ -107723,53 +97257,29 @@ 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-d54eb633-98ea-459d-aa00-6a8e780175a7' - ) + floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model_json['id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN: @@ -107777,52 +97287,29 @@ 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' # 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 - ) - assert ( - floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref: @@ -107830,52 +97317,29 @@ 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/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + 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/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' # 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 - ) - assert ( - floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_FloatingIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById: @@ -107883,52 +97347,29 @@ 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' - ] = '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + 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'] = '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' # 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 - ) - assert ( - floating_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN: @@ -107943,44 +97384,22 @@ def test_flow_log_collector_target_prototype_instance_identity_instance_identity # 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0' # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref: @@ -107995,44 +97414,22 @@ def test_flow_log_collector_target_prototype_instance_identity_instance_identity # 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + flow_log_collector_target_prototype_instance_identity_instance_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById: @@ -108047,44 +97444,22 @@ def test_flow_log_collector_target_prototype_instance_identity_instance_identity # 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + flow_log_collector_target_prototype_instance_identity_instance_identity_by_id_model_json['id'] = '0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityByHref: @@ -108092,52 +97467,29 @@ 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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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 = {} + 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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/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 - ) - assert ( - flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_href_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_FlowLogCollectorTargetPrototypeInstanceNetworkAttachmentIdentityInstanceNetworkAttachmentIdentityById: @@ -108145,52 +97497,29 @@ 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 = {} + 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 - ) - assert ( - flow_log_collector_target_prototype_instance_network_attachment_identity_instance_network_attachment_identity_by_id_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref: @@ -108198,52 +97527,29 @@ 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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' + 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/0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/0717-d54eb633-98ea-459d-aa00-6a8e780175a7' # 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 - ) - assert ( - flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_href_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById: @@ -108251,50 +97557,29 @@ 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-d54eb633-98ea-459d-aa00-6a8e780175a7' + flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_id_model_json['id'] = '0717-d54eb633-98ea-459d-aa00-6a8e780175a7' # 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 - ) - assert ( - flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_id_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN: @@ -108309,44 +97594,22 @@ def test_flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_ # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref: @@ -108361,44 +97624,22 @@ def test_flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_ # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById: @@ -108413,44 +97654,22 @@ def test_flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_ # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN: @@ -108465,44 +97684,22 @@ def test_flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_crn_se # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref: @@ -108517,44 +97714,22 @@ def test_flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_href_s # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById: @@ -108569,44 +97744,22 @@ def test_flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_id_ser # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN: @@ -108614,52 +97767,29 @@ 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' # 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 - ) - assert ( - flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref: @@ -108667,52 +97797,29 @@ 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/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + 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/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' # 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 - ) - assert ( - flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_FlowLogCollectorTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById: @@ -108720,52 +97827,29 @@ 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' - ] = '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + 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'] = '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' # 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 - ) - assert ( - flow_log_collector_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref: @@ -108773,52 +97857,29 @@ class TestModel_InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterface Test Class for InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref """ - def test_instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_serialization( - self, - ): + def test_instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_serialization(self): """ Test serialization/deserialization for InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref """ # Construct a json representation of a InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref model - instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_model_json = ( - {} - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_model_json[ - 'href' - ] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb' + instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_model_json = {} + instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/cluster_networks/0717-da0df18c-7598-4633-a648-fdaac28a5573/interfaces/0717-ffc092f7-5d02-4b93-ab69-26860529b9fb' # Construct a model instance of InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref by calling from_dict on the json representation - instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_model = InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref.from_dict( - instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_model_json - ) - assert ( - instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_model - != False - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_model = InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref.from_dict(instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_model_json) + assert instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_model != False # Construct a model instance of InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref by calling from_dict on the json representation - instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_model_dict = InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref.from_dict( - instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_model_json - ).__dict__ - instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_model2 = InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref( - **instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_model_dict - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_model_dict = InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref.from_dict(instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_model_json).__dict__ + instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_model2 = InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityByHref(**instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_model_dict) # Verify the model instances are equivalent - assert ( - instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_model - == instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_model2 - ) + assert instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_model == instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_model2 # Convert model instance back to dict and verify no loss of data - instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_model_json2 = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_model.to_dict() - ) - assert ( - instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_model_json2 - == instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_model_json - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_model_json2 = instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_model.to_dict() + assert instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_model_json2 == instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_href_model_json class TestModel_InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById: @@ -108826,52 +97887,29 @@ class TestModel_InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterface Test Class for InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById """ - def test_instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_serialization( - self, - ): + def test_instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_serialization(self): """ Test serialization/deserialization for InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById """ # Construct a json representation of a InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById model - instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_model_json = ( - {} - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_model_json[ - 'id' - ] = '0717-ffc092f7-5d02-4b93-ab69-26860529b9fb' + instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_model_json = {} + instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_model_json['id'] = '0717-ffc092f7-5d02-4b93-ab69-26860529b9fb' # Construct a model instance of InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById by calling from_dict on the json representation - instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_model = InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById.from_dict( - instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_model_json - ) - assert ( - instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_model - != False - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_model = InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById.from_dict(instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_model_json) + assert instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_model != False # Construct a model instance of InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById by calling from_dict on the json representation - instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_model_dict = InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById.from_dict( - instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_model_json - ).__dict__ - instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_model2 = InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById( - **instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_model_dict - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_model_dict = InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById.from_dict(instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_model_json).__dict__ + instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_model2 = InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceClusterNetworkInterfaceIdentityClusterNetworkInterfaceIdentityById(**instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_model_dict) # Verify the model instances are equivalent - assert ( - instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_model - == instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_model2 - ) + assert instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_model == instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_model2 # Convert model instance back to dict and verify no loss of data - instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_model_json2 = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_model.to_dict() - ) - assert ( - instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_model_json2 - == instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_model_json - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_model_json2 = instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_model.to_dict() + assert instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_model_json2 == instance_cluster_network_attachment_prototype_cluster_network_interface_cluster_network_interface_identity_cluster_network_interface_identity_by_id_model_json class TestModel_InstanceGroupManagerActionScheduledActionGroupTarget: @@ -108894,64 +97932,32 @@ def test_instance_group_manager_action_scheduled_action_group_target_serializati 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7' + instance_group_manager_action_scheduled_action_group_target_model_json['id'] = 'r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7' + 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['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['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 - ) + 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() - ) - assert ( - instance_group_manager_action_scheduled_action_group_target_model_json2 - == instance_group_manager_action_scheduled_action_group_target_model_json - ) + 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 class TestModel_InstanceGroupManagerActionScheduledActionManagerTarget: @@ -108969,14 +97975,10 @@ def test_instance_group_manager_action_scheduled_action_manager_target_serializa deleted_model = {} # Deleted 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 = {} # InstanceGroupManagerScheduledActionManagerAutoScale instance_group_manager_scheduled_action_manager_model['deleted'] = 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea' + instance_group_manager_scheduled_action_manager_model['id'] = 'r006-bd21f31f-8a05-4451-836d-ab0347e91fea' 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 @@ -108986,64 +97988,32 @@ def test_instance_group_manager_action_scheduled_action_manager_target_serializa 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['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea/actions/r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7' + instance_group_manager_action_scheduled_action_manager_target_model_json['id'] = 'r006-b3fda6cb-6f66-4ab4-a636-100ded91e8d7' + 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['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['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 - ) + 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() - ) - assert ( - instance_group_manager_action_scheduled_action_manager_target_model_json2 - == instance_group_manager_action_scheduled_action_manager_target_model_json - ) + 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 class TestModel_InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref: @@ -109058,50 +98028,24 @@ def test_instance_group_manager_scheduled_action_manager_prototype_auto_scale_pr # 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/r006-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r006-bd21f31f-8a05-4451-836d-ab0347e91fea' # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById: @@ -109116,50 +98060,24 @@ def test_instance_group_manager_scheduled_action_manager_prototype_auto_scale_pr # 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'] = 'r006-bd21f31f-8a05-4451-836d-ab0347e91fea' # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN: @@ -109167,52 +98085,29 @@ 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' # 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 - ) - assert ( - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref: @@ -109220,52 +98115,29 @@ 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/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + 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/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' # 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 - ) - assert ( - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstanceNetworkAttachmentPrototypeVirtualNetworkInterfaceVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById: @@ -109273,52 +98145,29 @@ 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' - ] = '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + 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'] = '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' # 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 - ) - assert ( - instance_network_attachment_prototype_virtual_network_interface_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN: @@ -109326,52 +98175,29 @@ 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:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + 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:0717-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 - ) - assert ( - instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref: @@ -109379,52 +98205,29 @@ 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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + 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/0717-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 - ) - assert ( - instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById: @@ -109432,52 +98235,29 @@ 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' - ] = '0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + 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'] = '0717-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 - ) - assert ( - instance_placement_target_patch_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN: @@ -109492,44 +98272,22 @@ def test_instance_placement_target_patch_dedicated_host_identity_dedicated_host_ # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref: @@ -109537,53 +98295,29 @@ 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById: @@ -109598,44 +98332,22 @@ def test_instance_placement_target_patch_dedicated_host_identity_dedicated_host_ # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN: @@ -109643,52 +98355,29 @@ 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:0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + 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:0717-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 - ) - assert ( - instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_crn_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref: @@ -109696,52 +98385,29 @@ 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/0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + 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/0717-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 - ) - assert ( - instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_href_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById: @@ -109749,52 +98415,29 @@ 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' - ] = '0717-bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0' + 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'] = '0717-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 - ) - assert ( - instance_placement_target_prototype_dedicated_host_group_identity_dedicated_host_group_identity_by_id_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN: @@ -109802,53 +98445,29 @@ 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref: @@ -109856,55 +98475,29 @@ 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 - ) - ) - assert ( - instance_placement_target_prototype_dedicated_host_identity_dedicated_host_identity_by_href_model != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById: @@ -109912,53 +98505,29 @@ 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN: @@ -109966,53 +98535,29 @@ 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:r006-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:r006-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 - ) - ) - assert ( - instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_crn_model != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref: @@ -110020,53 +98565,29 @@ 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/r006-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/r006-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 - ) - ) - assert ( - instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_href_model != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById: @@ -110074,55 +98595,29 @@ 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'] = ( - 'r006-418fe842-a3e9-47b9-a938-1aa5bd632871' - ) + instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_id_model_json['id'] = 'r006-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 - ) - ) - assert ( - instance_placement_target_prototype_placement_group_identity_placement_group_identity_by_id_model != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment: @@ -110130,9 +98625,7 @@ 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 """ @@ -110142,9 +98635,7 @@ def test_instance_prototype_instance_by_catalog_offering_instance_by_catalog_off instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - cluster_network_interface_primary_ip_prototype_model = ( - {} - ) # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext + cluster_network_interface_primary_ip_prototype_model = {} # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext cluster_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' cluster_network_interface_primary_ip_prototype_model['auto_delete'] = False cluster_network_interface_primary_ip_prototype_model['name'] = 'my-cluster-network-subnet-reserved-ip' @@ -110152,26 +98643,14 @@ def test_instance_prototype_instance_by_catalog_offering_instance_by_catalog_off cluster_network_subnet_identity_model = {} # ClusterNetworkSubnetIdentityById cluster_network_subnet_identity_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - instance_cluster_network_attachment_prototype_cluster_network_interface_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment + instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = ( - 'my-cluster-network-interface' - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = ( - cluster_network_interface_primary_ip_prototype_model - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = ( - cluster_network_subnet_identity_model - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = cluster_network_subnet_identity_model - instance_cluster_network_attachment_prototype_instance_context_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeInstanceContext - instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_model - ) + instance_cluster_network_attachment_prototype_instance_context_model = {} # InstanceClusterNetworkAttachmentPrototypeInstanceContext + instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = instance_cluster_network_attachment_prototype_cluster_network_interface_model instance_cluster_network_attachment_prototype_instance_context_model['name'] = 'my-instance-network-attachment' trusted_profile_identity_model = {} # TrustedProfileIdentityById @@ -110189,9 +98668,7 @@ def test_instance_prototype_instance_by_catalog_offering_instance_by_catalog_off 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 = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName @@ -110201,7 +98678,7 @@ def test_instance_prototype_instance_by_catalog_offering_instance_by_catalog_off reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype - instance_reservation_affinity_prototype_model['policy'] = 'disabled' + instance_reservation_affinity_prototype_model['policy'] = 'automatic' instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] resource_group_identity_model = {} # ResourceGroupIdentityById @@ -110219,9 +98696,7 @@ def test_instance_prototype_instance_by_catalog_offering_instance_by_catalog_off 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' @@ -110235,26 +98710,16 @@ def test_instance_prototype_instance_by_catalog_offering_instance_by_catalog_off 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 = {} # 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['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_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' - ) + 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 @@ -110263,16 +98728,12 @@ def test_instance_prototype_instance_by_catalog_offering_instance_by_catalog_off 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 = {} # 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' @@ -110283,141 +98744,60 @@ def test_instance_prototype_instance_by_catalog_offering_instance_by_catalog_off 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 = {} # 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['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['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['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_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[ - 'cluster_network_attachments' - ] = [ - instance_cluster_network_attachment_prototype_instance_context_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 + 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['cluster_network_attachments'] = [instance_cluster_network_attachment_prototype_instance_context_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 - ) - assert ( - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_attachment_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface: @@ -110425,9 +98805,7 @@ 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 """ @@ -110437,9 +98815,7 @@ def test_instance_prototype_instance_by_catalog_offering_instance_by_catalog_off instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - cluster_network_interface_primary_ip_prototype_model = ( - {} - ) # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext + cluster_network_interface_primary_ip_prototype_model = {} # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext cluster_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' cluster_network_interface_primary_ip_prototype_model['auto_delete'] = False cluster_network_interface_primary_ip_prototype_model['name'] = 'my-cluster-network-subnet-reserved-ip' @@ -110447,26 +98823,14 @@ def test_instance_prototype_instance_by_catalog_offering_instance_by_catalog_off cluster_network_subnet_identity_model = {} # ClusterNetworkSubnetIdentityById cluster_network_subnet_identity_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - instance_cluster_network_attachment_prototype_cluster_network_interface_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment + instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = ( - 'my-cluster-network-interface' - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = ( - cluster_network_interface_primary_ip_prototype_model - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = ( - cluster_network_subnet_identity_model - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = cluster_network_subnet_identity_model - instance_cluster_network_attachment_prototype_instance_context_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeInstanceContext - instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_model - ) + instance_cluster_network_attachment_prototype_instance_context_model = {} # InstanceClusterNetworkAttachmentPrototypeInstanceContext + instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = instance_cluster_network_attachment_prototype_cluster_network_interface_model instance_cluster_network_attachment_prototype_instance_context_model['name'] = 'my-instance-network-attachment' trusted_profile_identity_model = {} # TrustedProfileIdentityById @@ -110484,9 +98848,7 @@ def test_instance_prototype_instance_by_catalog_offering_instance_by_catalog_off 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 = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName @@ -110496,7 +98858,7 @@ def test_instance_prototype_instance_by_catalog_offering_instance_by_catalog_off reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype - instance_reservation_affinity_prototype_model['policy'] = 'disabled' + instance_reservation_affinity_prototype_model['policy'] = 'automatic' instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] resource_group_identity_model = {} # ResourceGroupIdentityById @@ -110514,9 +98876,7 @@ def test_instance_prototype_instance_by_catalog_offering_instance_by_catalog_off 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' @@ -110530,26 +98890,16 @@ def test_instance_prototype_instance_by_catalog_offering_instance_by_catalog_off 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 = {} # 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['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_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' - ) + 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 @@ -110558,9 +98908,7 @@ def test_instance_prototype_instance_by_catalog_offering_instance_by_catalog_off 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' @@ -110579,112 +98927,43 @@ def test_instance_prototype_instance_by_catalog_offering_instance_by_catalog_off 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[ - 'cluster_network_attachments' - ] = [ - instance_cluster_network_attachment_prototype_instance_context_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 + 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['cluster_network_attachments'] = [instance_cluster_network_attachment_prototype_instance_context_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 - ) - assert ( - instance_prototype_instance_by_catalog_offering_instance_by_catalog_offering_instance_by_network_interface_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment: @@ -110702,9 +98981,7 @@ def test_instance_prototype_instance_by_image_instance_by_image_instance_by_netw instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - cluster_network_interface_primary_ip_prototype_model = ( - {} - ) # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext + cluster_network_interface_primary_ip_prototype_model = {} # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext cluster_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' cluster_network_interface_primary_ip_prototype_model['auto_delete'] = False cluster_network_interface_primary_ip_prototype_model['name'] = 'my-cluster-network-subnet-reserved-ip' @@ -110712,26 +98989,14 @@ def test_instance_prototype_instance_by_image_instance_by_image_instance_by_netw cluster_network_subnet_identity_model = {} # ClusterNetworkSubnetIdentityById cluster_network_subnet_identity_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - instance_cluster_network_attachment_prototype_cluster_network_interface_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment + instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = ( - 'my-cluster-network-interface' - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = ( - cluster_network_interface_primary_ip_prototype_model - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = ( - cluster_network_subnet_identity_model - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = cluster_network_subnet_identity_model - instance_cluster_network_attachment_prototype_instance_context_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeInstanceContext - instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_model - ) + instance_cluster_network_attachment_prototype_instance_context_model = {} # InstanceClusterNetworkAttachmentPrototypeInstanceContext + instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = instance_cluster_network_attachment_prototype_cluster_network_interface_model instance_cluster_network_attachment_prototype_instance_context_model['name'] = 'my-instance-network-attachment' trusted_profile_identity_model = {} # TrustedProfileIdentityById @@ -110749,9 +99014,7 @@ def test_instance_prototype_instance_by_image_instance_by_image_instance_by_netw 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 = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName @@ -110761,7 +99024,7 @@ def test_instance_prototype_instance_by_image_instance_by_image_instance_by_netw reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype - instance_reservation_affinity_prototype_model['policy'] = 'disabled' + instance_reservation_affinity_prototype_model['policy'] = 'automatic' instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] resource_group_identity_model = {} # ResourceGroupIdentityById @@ -110779,9 +99042,7 @@ def test_instance_prototype_instance_by_image_instance_by_image_instance_by_netw 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' @@ -110795,14 +99056,10 @@ def test_instance_prototype_instance_by_image_instance_by_image_instance_by_netw 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 = {} # 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['volume'] = volume_prototype_instance_by_image_context_model image_identity_model = {} # ImageIdentityById image_identity_model['id'] = 'r006-02c73baf-9abb-493d-9e41-d0f1866f4051' @@ -110810,16 +99067,12 @@ 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 = {} # 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' @@ -110830,134 +99083,60 @@ def test_instance_prototype_instance_by_image_instance_by_image_instance_by_netw 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 = {} # 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['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['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['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_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[ - 'cluster_network_attachments' - ] = [instance_cluster_network_attachment_prototype_instance_context_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 + 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['cluster_network_attachments'] = [instance_cluster_network_attachment_prototype_instance_context_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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface: @@ -110975,9 +99154,7 @@ def test_instance_prototype_instance_by_image_instance_by_image_instance_by_netw instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - cluster_network_interface_primary_ip_prototype_model = ( - {} - ) # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext + cluster_network_interface_primary_ip_prototype_model = {} # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext cluster_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' cluster_network_interface_primary_ip_prototype_model['auto_delete'] = False cluster_network_interface_primary_ip_prototype_model['name'] = 'my-cluster-network-subnet-reserved-ip' @@ -110985,26 +99162,14 @@ def test_instance_prototype_instance_by_image_instance_by_image_instance_by_netw cluster_network_subnet_identity_model = {} # ClusterNetworkSubnetIdentityById cluster_network_subnet_identity_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - instance_cluster_network_attachment_prototype_cluster_network_interface_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment + instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = ( - 'my-cluster-network-interface' - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = ( - cluster_network_interface_primary_ip_prototype_model - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = ( - cluster_network_subnet_identity_model - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = cluster_network_subnet_identity_model - instance_cluster_network_attachment_prototype_instance_context_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeInstanceContext - instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_model - ) + instance_cluster_network_attachment_prototype_instance_context_model = {} # InstanceClusterNetworkAttachmentPrototypeInstanceContext + instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = instance_cluster_network_attachment_prototype_cluster_network_interface_model instance_cluster_network_attachment_prototype_instance_context_model['name'] = 'my-instance-network-attachment' trusted_profile_identity_model = {} # TrustedProfileIdentityById @@ -111022,9 +99187,7 @@ def test_instance_prototype_instance_by_image_instance_by_image_instance_by_netw 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 = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName @@ -111034,7 +99197,7 @@ def test_instance_prototype_instance_by_image_instance_by_image_instance_by_netw reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype - instance_reservation_affinity_prototype_model['policy'] = 'disabled' + instance_reservation_affinity_prototype_model['policy'] = 'automatic' instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] resource_group_identity_model = {} # ResourceGroupIdentityById @@ -111052,9 +99215,7 @@ def test_instance_prototype_instance_by_image_instance_by_image_instance_by_netw 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' @@ -111068,14 +99229,10 @@ def test_instance_prototype_instance_by_image_instance_by_image_instance_by_netw 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 = {} # 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['volume'] = volume_prototype_instance_by_image_context_model image_identity_model = {} # ImageIdentityById image_identity_model['id'] = 'r006-02c73baf-9abb-493d-9e41-d0f1866f4051' @@ -111083,9 +99240,7 @@ 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' @@ -111105,104 +99260,42 @@ def test_instance_prototype_instance_by_image_instance_by_image_instance_by_netw # 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[ - 'cluster_network_attachments' - ] = [instance_cluster_network_attachment_prototype_instance_context_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 + 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['cluster_network_attachments'] = [instance_cluster_network_attachment_prototype_instance_context_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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment: @@ -111210,9 +99303,7 @@ 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 """ @@ -111222,9 +99313,7 @@ def test_instance_prototype_instance_by_source_snapshot_instance_by_source_snaps instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - cluster_network_interface_primary_ip_prototype_model = ( - {} - ) # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext + cluster_network_interface_primary_ip_prototype_model = {} # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext cluster_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' cluster_network_interface_primary_ip_prototype_model['auto_delete'] = False cluster_network_interface_primary_ip_prototype_model['name'] = 'my-cluster-network-subnet-reserved-ip' @@ -111232,26 +99321,14 @@ def test_instance_prototype_instance_by_source_snapshot_instance_by_source_snaps cluster_network_subnet_identity_model = {} # ClusterNetworkSubnetIdentityById cluster_network_subnet_identity_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - instance_cluster_network_attachment_prototype_cluster_network_interface_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment + instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = ( - 'my-cluster-network-interface' - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = ( - cluster_network_interface_primary_ip_prototype_model - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = ( - cluster_network_subnet_identity_model - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = cluster_network_subnet_identity_model - instance_cluster_network_attachment_prototype_instance_context_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeInstanceContext - instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_model - ) + instance_cluster_network_attachment_prototype_instance_context_model = {} # InstanceClusterNetworkAttachmentPrototypeInstanceContext + instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = instance_cluster_network_attachment_prototype_cluster_network_interface_model instance_cluster_network_attachment_prototype_instance_context_model['name'] = 'my-instance-network-attachment' trusted_profile_identity_model = {} # TrustedProfileIdentityById @@ -111269,9 +99346,7 @@ def test_instance_prototype_instance_by_source_snapshot_instance_by_source_snaps 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 = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName @@ -111281,7 +99356,7 @@ def test_instance_prototype_instance_by_source_snapshot_instance_by_source_snaps reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype - instance_reservation_affinity_prototype_model['policy'] = 'disabled' + instance_reservation_affinity_prototype_model['policy'] = 'automatic' instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] resource_group_identity_model = {} # ResourceGroupIdentityById @@ -111299,9 +99374,7 @@ def test_instance_prototype_instance_by_source_snapshot_instance_by_source_snaps 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' @@ -111309,9 +99382,7 @@ def test_instance_prototype_instance_by_source_snapshot_instance_by_source_snaps snapshot_identity_model = {} # SnapshotIdentityById snapshot_identity_model['id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' - volume_prototype_instance_by_source_snapshot_context_model = ( - {} - ) # VolumePrototypeInstanceBySourceSnapshotContext + 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 @@ -111321,28 +99392,20 @@ def test_instance_prototype_instance_by_source_snapshot_instance_by_source_snaps 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 = {} # 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_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 = {} # 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' @@ -111353,138 +99416,59 @@ def test_instance_prototype_instance_by_source_snapshot_instance_by_source_snaps 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 = {} # 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['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['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['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_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[ - 'cluster_network_attachments' - ] = [ - instance_cluster_network_attachment_prototype_instance_context_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 + 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['cluster_network_attachments'] = [instance_cluster_network_attachment_prototype_instance_context_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 - ) - assert ( - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_attachment_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface: @@ -111492,9 +99476,7 @@ 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 """ @@ -111504,9 +99486,7 @@ def test_instance_prototype_instance_by_source_snapshot_instance_by_source_snaps instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - cluster_network_interface_primary_ip_prototype_model = ( - {} - ) # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext + cluster_network_interface_primary_ip_prototype_model = {} # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext cluster_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' cluster_network_interface_primary_ip_prototype_model['auto_delete'] = False cluster_network_interface_primary_ip_prototype_model['name'] = 'my-cluster-network-subnet-reserved-ip' @@ -111514,26 +99494,14 @@ def test_instance_prototype_instance_by_source_snapshot_instance_by_source_snaps cluster_network_subnet_identity_model = {} # ClusterNetworkSubnetIdentityById cluster_network_subnet_identity_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - instance_cluster_network_attachment_prototype_cluster_network_interface_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment + instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = ( - 'my-cluster-network-interface' - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = ( - cluster_network_interface_primary_ip_prototype_model - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = ( - cluster_network_subnet_identity_model - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = cluster_network_subnet_identity_model - instance_cluster_network_attachment_prototype_instance_context_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeInstanceContext - instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_model - ) + instance_cluster_network_attachment_prototype_instance_context_model = {} # InstanceClusterNetworkAttachmentPrototypeInstanceContext + instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = instance_cluster_network_attachment_prototype_cluster_network_interface_model instance_cluster_network_attachment_prototype_instance_context_model['name'] = 'my-instance-network-attachment' trusted_profile_identity_model = {} # TrustedProfileIdentityById @@ -111551,9 +99519,7 @@ def test_instance_prototype_instance_by_source_snapshot_instance_by_source_snaps 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 = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName @@ -111563,7 +99529,7 @@ def test_instance_prototype_instance_by_source_snapshot_instance_by_source_snaps reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype - instance_reservation_affinity_prototype_model['policy'] = 'disabled' + instance_reservation_affinity_prototype_model['policy'] = 'automatic' instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] resource_group_identity_model = {} # ResourceGroupIdentityById @@ -111581,9 +99547,7 @@ def test_instance_prototype_instance_by_source_snapshot_instance_by_source_snaps 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' @@ -111591,9 +99555,7 @@ def test_instance_prototype_instance_by_source_snapshot_instance_by_source_snaps snapshot_identity_model = {} # SnapshotIdentityById snapshot_identity_model['id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' - volume_prototype_instance_by_source_snapshot_context_model = ( - {} - ) # VolumePrototypeInstanceBySourceSnapshotContext + 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 @@ -111603,21 +99565,15 @@ def test_instance_prototype_instance_by_source_snapshot_instance_by_source_snaps 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 = {} # 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_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' @@ -111636,109 +99592,42 @@ def test_instance_prototype_instance_by_source_snapshot_instance_by_source_snaps 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[ - 'cluster_network_attachments' - ] = [ - instance_cluster_network_attachment_prototype_instance_context_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 + 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['cluster_network_attachments'] = [instance_cluster_network_attachment_prototype_instance_context_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 - ) - assert ( - instance_prototype_instance_by_source_snapshot_instance_by_source_snapshot_instance_by_network_interface_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment: @@ -111746,9 +99635,7 @@ 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 """ @@ -111758,9 +99645,7 @@ def test_instance_prototype_instance_by_volume_instance_by_volume_instance_by_ne instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - cluster_network_interface_primary_ip_prototype_model = ( - {} - ) # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext + cluster_network_interface_primary_ip_prototype_model = {} # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext cluster_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' cluster_network_interface_primary_ip_prototype_model['auto_delete'] = False cluster_network_interface_primary_ip_prototype_model['name'] = 'my-cluster-network-subnet-reserved-ip' @@ -111768,26 +99653,14 @@ def test_instance_prototype_instance_by_volume_instance_by_volume_instance_by_ne cluster_network_subnet_identity_model = {} # ClusterNetworkSubnetIdentityById cluster_network_subnet_identity_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - instance_cluster_network_attachment_prototype_cluster_network_interface_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment + instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = ( - 'my-cluster-network-interface' - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = ( - cluster_network_interface_primary_ip_prototype_model - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = ( - cluster_network_subnet_identity_model - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = cluster_network_subnet_identity_model - instance_cluster_network_attachment_prototype_instance_context_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeInstanceContext - instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_model - ) + instance_cluster_network_attachment_prototype_instance_context_model = {} # InstanceClusterNetworkAttachmentPrototypeInstanceContext + instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = instance_cluster_network_attachment_prototype_cluster_network_interface_model instance_cluster_network_attachment_prototype_instance_context_model['name'] = 'my-instance-network-attachment' trusted_profile_identity_model = {} # TrustedProfileIdentityById @@ -111805,9 +99678,7 @@ def test_instance_prototype_instance_by_volume_instance_by_volume_instance_by_ne 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 = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName @@ -111817,7 +99688,7 @@ def test_instance_prototype_instance_by_volume_instance_by_volume_instance_by_ne reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype - instance_reservation_affinity_prototype_model['policy'] = 'disabled' + instance_reservation_affinity_prototype_model['policy'] = 'automatic' instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] resource_group_identity_model = {} # ResourceGroupIdentityById @@ -111837,9 +99708,7 @@ def test_instance_prototype_instance_by_volume_instance_by_volume_instance_by_ne 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 = {} # 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 @@ -111847,16 +99716,12 @@ def test_instance_prototype_instance_by_volume_instance_by_volume_instance_by_ne 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 = {} # 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' @@ -111867,131 +99732,59 @@ def test_instance_prototype_instance_by_volume_instance_by_volume_instance_by_ne 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 = {} # 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['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['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['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_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[ - 'cluster_network_attachments' - ] = [instance_cluster_network_attachment_prototype_instance_context_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 + 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['cluster_network_attachments'] = [instance_cluster_network_attachment_prototype_instance_context_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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface: @@ -112009,9 +99802,7 @@ def test_instance_prototype_instance_by_volume_instance_by_volume_instance_by_ne instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - cluster_network_interface_primary_ip_prototype_model = ( - {} - ) # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext + cluster_network_interface_primary_ip_prototype_model = {} # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext cluster_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' cluster_network_interface_primary_ip_prototype_model['auto_delete'] = False cluster_network_interface_primary_ip_prototype_model['name'] = 'my-cluster-network-subnet-reserved-ip' @@ -112019,26 +99810,14 @@ def test_instance_prototype_instance_by_volume_instance_by_volume_instance_by_ne cluster_network_subnet_identity_model = {} # ClusterNetworkSubnetIdentityById cluster_network_subnet_identity_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - instance_cluster_network_attachment_prototype_cluster_network_interface_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment + instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = ( - 'my-cluster-network-interface' - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = ( - cluster_network_interface_primary_ip_prototype_model - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = ( - cluster_network_subnet_identity_model - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = cluster_network_subnet_identity_model - instance_cluster_network_attachment_prototype_instance_context_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeInstanceContext - instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_model - ) + instance_cluster_network_attachment_prototype_instance_context_model = {} # InstanceClusterNetworkAttachmentPrototypeInstanceContext + instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = instance_cluster_network_attachment_prototype_cluster_network_interface_model instance_cluster_network_attachment_prototype_instance_context_model['name'] = 'my-instance-network-attachment' trusted_profile_identity_model = {} # TrustedProfileIdentityById @@ -112056,9 +99835,7 @@ def test_instance_prototype_instance_by_volume_instance_by_volume_instance_by_ne 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 = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName @@ -112068,7 +99845,7 @@ def test_instance_prototype_instance_by_volume_instance_by_volume_instance_by_ne reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype - instance_reservation_affinity_prototype_model['policy'] = 'disabled' + instance_reservation_affinity_prototype_model['policy'] = 'automatic' instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] resource_group_identity_model = {} # ResourceGroupIdentityById @@ -112088,9 +99865,7 @@ def test_instance_prototype_instance_by_volume_instance_by_volume_instance_by_ne 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 = {} # 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 @@ -112098,9 +99873,7 @@ def test_instance_prototype_instance_by_volume_instance_by_volume_instance_by_ne 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' @@ -112120,101 +99893,41 @@ def test_instance_prototype_instance_by_volume_instance_by_volume_instance_by_ne # 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[ - 'cluster_network_attachments' - ] = [instance_cluster_network_attachment_prototype_instance_context_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 + 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['cluster_network_attachments'] = [instance_cluster_network_attachment_prototype_instance_context_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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment: @@ -112222,9 +99935,7 @@ 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 """ @@ -112234,9 +99945,7 @@ def test_instance_template_prototype_instance_template_by_catalog_offering_insta instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - cluster_network_interface_primary_ip_prototype_model = ( - {} - ) # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext + cluster_network_interface_primary_ip_prototype_model = {} # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext cluster_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' cluster_network_interface_primary_ip_prototype_model['auto_delete'] = False cluster_network_interface_primary_ip_prototype_model['name'] = 'my-cluster-network-subnet-reserved-ip' @@ -112244,26 +99953,14 @@ def test_instance_template_prototype_instance_template_by_catalog_offering_insta cluster_network_subnet_identity_model = {} # ClusterNetworkSubnetIdentityById cluster_network_subnet_identity_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - instance_cluster_network_attachment_prototype_cluster_network_interface_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment + instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = ( - 'my-cluster-network-interface' - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = ( - cluster_network_interface_primary_ip_prototype_model - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = ( - cluster_network_subnet_identity_model - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = cluster_network_subnet_identity_model - instance_cluster_network_attachment_prototype_instance_context_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeInstanceContext - instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_model - ) + instance_cluster_network_attachment_prototype_instance_context_model = {} # InstanceClusterNetworkAttachmentPrototypeInstanceContext + instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = instance_cluster_network_attachment_prototype_cluster_network_interface_model instance_cluster_network_attachment_prototype_instance_context_model['name'] = 'my-instance-network-attachment' trusted_profile_identity_model = {} # TrustedProfileIdentityById @@ -112281,9 +99978,7 @@ def test_instance_template_prototype_instance_template_by_catalog_offering_insta 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 = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName @@ -112293,7 +99988,7 @@ def test_instance_template_prototype_instance_template_by_catalog_offering_insta reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype - instance_reservation_affinity_prototype_model['policy'] = 'disabled' + instance_reservation_affinity_prototype_model['policy'] = 'automatic' instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] resource_group_identity_model = {} # ResourceGroupIdentityById @@ -112311,9 +100006,7 @@ def test_instance_template_prototype_instance_template_by_catalog_offering_insta 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' @@ -112327,26 +100020,16 @@ def test_instance_template_prototype_instance_template_by_catalog_offering_insta 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 = {} # 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['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_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' - ) + 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 @@ -112355,16 +100038,12 @@ def test_instance_template_prototype_instance_template_by_catalog_offering_insta 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 = {} # 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' @@ -112375,141 +100054,60 @@ def test_instance_template_prototype_instance_template_by_catalog_offering_insta 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 = {} # 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['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['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['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_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[ - 'cluster_network_attachments' - ] = [ - instance_cluster_network_attachment_prototype_instance_context_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 + 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['cluster_network_attachments'] = [instance_cluster_network_attachment_prototype_instance_context_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 - ) - assert ( - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_attachment_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface: @@ -112517,9 +100115,7 @@ 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 """ @@ -112529,9 +100125,7 @@ def test_instance_template_prototype_instance_template_by_catalog_offering_insta instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - cluster_network_interface_primary_ip_prototype_model = ( - {} - ) # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext + cluster_network_interface_primary_ip_prototype_model = {} # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext cluster_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' cluster_network_interface_primary_ip_prototype_model['auto_delete'] = False cluster_network_interface_primary_ip_prototype_model['name'] = 'my-cluster-network-subnet-reserved-ip' @@ -112539,26 +100133,14 @@ def test_instance_template_prototype_instance_template_by_catalog_offering_insta cluster_network_subnet_identity_model = {} # ClusterNetworkSubnetIdentityById cluster_network_subnet_identity_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - instance_cluster_network_attachment_prototype_cluster_network_interface_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment + instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = ( - 'my-cluster-network-interface' - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = ( - cluster_network_interface_primary_ip_prototype_model - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = ( - cluster_network_subnet_identity_model - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = cluster_network_subnet_identity_model - instance_cluster_network_attachment_prototype_instance_context_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeInstanceContext - instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_model - ) + instance_cluster_network_attachment_prototype_instance_context_model = {} # InstanceClusterNetworkAttachmentPrototypeInstanceContext + instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = instance_cluster_network_attachment_prototype_cluster_network_interface_model instance_cluster_network_attachment_prototype_instance_context_model['name'] = 'my-instance-network-attachment' trusted_profile_identity_model = {} # TrustedProfileIdentityById @@ -112576,9 +100158,7 @@ def test_instance_template_prototype_instance_template_by_catalog_offering_insta 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 = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName @@ -112588,7 +100168,7 @@ def test_instance_template_prototype_instance_template_by_catalog_offering_insta reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype - instance_reservation_affinity_prototype_model['policy'] = 'disabled' + instance_reservation_affinity_prototype_model['policy'] = 'automatic' instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] resource_group_identity_model = {} # ResourceGroupIdentityById @@ -112606,9 +100186,7 @@ def test_instance_template_prototype_instance_template_by_catalog_offering_insta 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' @@ -112622,26 +100200,16 @@ def test_instance_template_prototype_instance_template_by_catalog_offering_insta 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 = {} # 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['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_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' - ) + 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 @@ -112650,9 +100218,7 @@ def test_instance_template_prototype_instance_template_by_catalog_offering_insta 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' @@ -112671,112 +100237,43 @@ def test_instance_template_prototype_instance_template_by_catalog_offering_insta 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[ - 'cluster_network_attachments' - ] = [ - instance_cluster_network_attachment_prototype_instance_context_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 + 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['cluster_network_attachments'] = [instance_cluster_network_attachment_prototype_instance_context_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 - ) - assert ( - instance_template_prototype_instance_template_by_catalog_offering_instance_template_by_catalog_offering_instance_by_network_interface_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment: @@ -112784,9 +100281,7 @@ 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 """ @@ -112796,9 +100291,7 @@ def test_instance_template_prototype_instance_template_by_image_instance_templat instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - cluster_network_interface_primary_ip_prototype_model = ( - {} - ) # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext + cluster_network_interface_primary_ip_prototype_model = {} # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext cluster_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' cluster_network_interface_primary_ip_prototype_model['auto_delete'] = False cluster_network_interface_primary_ip_prototype_model['name'] = 'my-cluster-network-subnet-reserved-ip' @@ -112806,26 +100299,14 @@ def test_instance_template_prototype_instance_template_by_image_instance_templat cluster_network_subnet_identity_model = {} # ClusterNetworkSubnetIdentityById cluster_network_subnet_identity_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - instance_cluster_network_attachment_prototype_cluster_network_interface_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment + instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = ( - 'my-cluster-network-interface' - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = ( - cluster_network_interface_primary_ip_prototype_model - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = ( - cluster_network_subnet_identity_model - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = cluster_network_subnet_identity_model - instance_cluster_network_attachment_prototype_instance_context_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeInstanceContext - instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_model - ) + instance_cluster_network_attachment_prototype_instance_context_model = {} # InstanceClusterNetworkAttachmentPrototypeInstanceContext + instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = instance_cluster_network_attachment_prototype_cluster_network_interface_model instance_cluster_network_attachment_prototype_instance_context_model['name'] = 'my-instance-network-attachment' trusted_profile_identity_model = {} # TrustedProfileIdentityById @@ -112843,9 +100324,7 @@ def test_instance_template_prototype_instance_template_by_image_instance_templat 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 = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName @@ -112855,7 +100334,7 @@ def test_instance_template_prototype_instance_template_by_image_instance_templat reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype - instance_reservation_affinity_prototype_model['policy'] = 'disabled' + instance_reservation_affinity_prototype_model['policy'] = 'automatic' instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] resource_group_identity_model = {} # ResourceGroupIdentityById @@ -112873,9 +100352,7 @@ def test_instance_template_prototype_instance_template_by_image_instance_templat 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' @@ -112889,14 +100366,10 @@ def test_instance_template_prototype_instance_template_by_image_instance_templat 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 = {} # 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['volume'] = volume_prototype_instance_by_image_context_model image_identity_model = {} # ImageIdentityById image_identity_model['id'] = 'r006-02c73baf-9abb-493d-9e41-d0f1866f4051' @@ -112904,16 +100377,12 @@ 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 = {} # 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' @@ -112924,141 +100393,60 @@ def test_instance_template_prototype_instance_template_by_image_instance_templat 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 = {} # 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['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['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['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_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[ - 'cluster_network_attachments' - ] = [ - instance_cluster_network_attachment_prototype_instance_context_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 + 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['cluster_network_attachments'] = [instance_cluster_network_attachment_prototype_instance_context_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 - ) - assert ( - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_attachment_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface: @@ -113066,9 +100454,7 @@ 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 """ @@ -113078,9 +100464,7 @@ def test_instance_template_prototype_instance_template_by_image_instance_templat instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - cluster_network_interface_primary_ip_prototype_model = ( - {} - ) # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext + cluster_network_interface_primary_ip_prototype_model = {} # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext cluster_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' cluster_network_interface_primary_ip_prototype_model['auto_delete'] = False cluster_network_interface_primary_ip_prototype_model['name'] = 'my-cluster-network-subnet-reserved-ip' @@ -113088,26 +100472,14 @@ def test_instance_template_prototype_instance_template_by_image_instance_templat cluster_network_subnet_identity_model = {} # ClusterNetworkSubnetIdentityById cluster_network_subnet_identity_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - instance_cluster_network_attachment_prototype_cluster_network_interface_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment + instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = ( - 'my-cluster-network-interface' - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = ( - cluster_network_interface_primary_ip_prototype_model - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = ( - cluster_network_subnet_identity_model - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = cluster_network_subnet_identity_model - instance_cluster_network_attachment_prototype_instance_context_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeInstanceContext - instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_model - ) + instance_cluster_network_attachment_prototype_instance_context_model = {} # InstanceClusterNetworkAttachmentPrototypeInstanceContext + instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = instance_cluster_network_attachment_prototype_cluster_network_interface_model instance_cluster_network_attachment_prototype_instance_context_model['name'] = 'my-instance-network-attachment' trusted_profile_identity_model = {} # TrustedProfileIdentityById @@ -113125,9 +100497,7 @@ def test_instance_template_prototype_instance_template_by_image_instance_templat 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 = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName @@ -113137,7 +100507,7 @@ def test_instance_template_prototype_instance_template_by_image_instance_templat reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype - instance_reservation_affinity_prototype_model['policy'] = 'disabled' + instance_reservation_affinity_prototype_model['policy'] = 'automatic' instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] resource_group_identity_model = {} # ResourceGroupIdentityById @@ -113155,9 +100525,7 @@ def test_instance_template_prototype_instance_template_by_image_instance_templat 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' @@ -113171,14 +100539,10 @@ def test_instance_template_prototype_instance_template_by_image_instance_templat 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 = {} # 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['volume'] = volume_prototype_instance_by_image_context_model image_identity_model = {} # ImageIdentityById image_identity_model['id'] = 'r006-02c73baf-9abb-493d-9e41-d0f1866f4051' @@ -113186,9 +100550,7 @@ 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' @@ -113207,112 +100569,43 @@ def test_instance_template_prototype_instance_template_by_image_instance_templat 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[ - 'cluster_network_attachments' - ] = [ - instance_cluster_network_attachment_prototype_instance_context_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 + 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['cluster_network_attachments'] = [instance_cluster_network_attachment_prototype_instance_context_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 - ) - assert ( - instance_template_prototype_instance_template_by_image_instance_template_by_image_instance_by_network_interface_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment: @@ -113320,9 +100613,7 @@ 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 """ @@ -113332,9 +100623,7 @@ def test_instance_template_prototype_instance_template_by_source_snapshot_instan instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - cluster_network_interface_primary_ip_prototype_model = ( - {} - ) # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext + cluster_network_interface_primary_ip_prototype_model = {} # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext cluster_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' cluster_network_interface_primary_ip_prototype_model['auto_delete'] = False cluster_network_interface_primary_ip_prototype_model['name'] = 'my-cluster-network-subnet-reserved-ip' @@ -113342,26 +100631,14 @@ def test_instance_template_prototype_instance_template_by_source_snapshot_instan cluster_network_subnet_identity_model = {} # ClusterNetworkSubnetIdentityById cluster_network_subnet_identity_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - instance_cluster_network_attachment_prototype_cluster_network_interface_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment + instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = ( - 'my-cluster-network-interface' - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = ( - cluster_network_interface_primary_ip_prototype_model - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = ( - cluster_network_subnet_identity_model - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = cluster_network_subnet_identity_model - instance_cluster_network_attachment_prototype_instance_context_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeInstanceContext - instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_model - ) + instance_cluster_network_attachment_prototype_instance_context_model = {} # InstanceClusterNetworkAttachmentPrototypeInstanceContext + instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = instance_cluster_network_attachment_prototype_cluster_network_interface_model instance_cluster_network_attachment_prototype_instance_context_model['name'] = 'my-instance-network-attachment' trusted_profile_identity_model = {} # TrustedProfileIdentityById @@ -113379,9 +100656,7 @@ def test_instance_template_prototype_instance_template_by_source_snapshot_instan 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 = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName @@ -113391,7 +100666,7 @@ def test_instance_template_prototype_instance_template_by_source_snapshot_instan reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype - instance_reservation_affinity_prototype_model['policy'] = 'disabled' + instance_reservation_affinity_prototype_model['policy'] = 'automatic' instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] resource_group_identity_model = {} # ResourceGroupIdentityById @@ -113409,9 +100684,7 @@ def test_instance_template_prototype_instance_template_by_source_snapshot_instan 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' @@ -113419,9 +100692,7 @@ def test_instance_template_prototype_instance_template_by_source_snapshot_instan snapshot_identity_model = {} # SnapshotIdentityById snapshot_identity_model['id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' - volume_prototype_instance_by_source_snapshot_context_model = ( - {} - ) # VolumePrototypeInstanceBySourceSnapshotContext + 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 @@ -113431,28 +100702,20 @@ def test_instance_template_prototype_instance_template_by_source_snapshot_instan 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 = {} # 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_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 = {} # 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' @@ -113463,138 +100726,59 @@ def test_instance_template_prototype_instance_template_by_source_snapshot_instan 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 = {} # 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['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['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['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_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[ - 'cluster_network_attachments' - ] = [ - instance_cluster_network_attachment_prototype_instance_context_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 + 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['cluster_network_attachments'] = [instance_cluster_network_attachment_prototype_instance_context_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 - ) - assert ( - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_attachment_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface: @@ -113602,9 +100786,7 @@ 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 """ @@ -113614,9 +100796,7 @@ def test_instance_template_prototype_instance_template_by_source_snapshot_instan instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - cluster_network_interface_primary_ip_prototype_model = ( - {} - ) # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext + cluster_network_interface_primary_ip_prototype_model = {} # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext cluster_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' cluster_network_interface_primary_ip_prototype_model['auto_delete'] = False cluster_network_interface_primary_ip_prototype_model['name'] = 'my-cluster-network-subnet-reserved-ip' @@ -113624,26 +100804,14 @@ def test_instance_template_prototype_instance_template_by_source_snapshot_instan cluster_network_subnet_identity_model = {} # ClusterNetworkSubnetIdentityById cluster_network_subnet_identity_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - instance_cluster_network_attachment_prototype_cluster_network_interface_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment + instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = ( - 'my-cluster-network-interface' - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = ( - cluster_network_interface_primary_ip_prototype_model - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = ( - cluster_network_subnet_identity_model - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = cluster_network_subnet_identity_model - instance_cluster_network_attachment_prototype_instance_context_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeInstanceContext - instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_model - ) + instance_cluster_network_attachment_prototype_instance_context_model = {} # InstanceClusterNetworkAttachmentPrototypeInstanceContext + instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = instance_cluster_network_attachment_prototype_cluster_network_interface_model instance_cluster_network_attachment_prototype_instance_context_model['name'] = 'my-instance-network-attachment' trusted_profile_identity_model = {} # TrustedProfileIdentityById @@ -113661,9 +100829,7 @@ def test_instance_template_prototype_instance_template_by_source_snapshot_instan 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 = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName @@ -113673,7 +100839,7 @@ def test_instance_template_prototype_instance_template_by_source_snapshot_instan reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype - instance_reservation_affinity_prototype_model['policy'] = 'disabled' + instance_reservation_affinity_prototype_model['policy'] = 'automatic' instance_reservation_affinity_prototype_model['pool'] = [reservation_identity_model] resource_group_identity_model = {} # ResourceGroupIdentityById @@ -113691,9 +100857,7 @@ def test_instance_template_prototype_instance_template_by_source_snapshot_instan 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' @@ -113701,9 +100865,7 @@ def test_instance_template_prototype_instance_template_by_source_snapshot_instan snapshot_identity_model = {} # SnapshotIdentityById snapshot_identity_model['id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' - volume_prototype_instance_by_source_snapshot_context_model = ( - {} - ) # VolumePrototypeInstanceBySourceSnapshotContext + 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 @@ -113713,21 +100875,15 @@ def test_instance_template_prototype_instance_template_by_source_snapshot_instan 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 = {} # 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_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' @@ -113746,109 +100902,42 @@ def test_instance_template_prototype_instance_template_by_source_snapshot_instan 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[ - 'cluster_network_attachments' - ] = [ - instance_cluster_network_attachment_prototype_instance_context_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 + 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['cluster_network_attachments'] = [instance_cluster_network_attachment_prototype_instance_context_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 - ) - assert ( - instance_template_prototype_instance_template_by_source_snapshot_instance_template_by_source_snapshot_instance_by_network_interface_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment: @@ -113856,9 +100945,7 @@ 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 """ @@ -113868,9 +100955,7 @@ def test_instance_template_instance_by_catalog_offering_instance_template_contex instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - cluster_network_interface_primary_ip_prototype_model = ( - {} - ) # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext + cluster_network_interface_primary_ip_prototype_model = {} # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext cluster_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' cluster_network_interface_primary_ip_prototype_model['auto_delete'] = False cluster_network_interface_primary_ip_prototype_model['name'] = 'my-cluster-network-subnet-reserved-ip' @@ -113878,26 +100963,14 @@ def test_instance_template_instance_by_catalog_offering_instance_template_contex cluster_network_subnet_identity_model = {} # ClusterNetworkSubnetIdentityById cluster_network_subnet_identity_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - instance_cluster_network_attachment_prototype_cluster_network_interface_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment + instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = ( - 'my-cluster-network-interface' - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = ( - cluster_network_interface_primary_ip_prototype_model - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = ( - cluster_network_subnet_identity_model - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = cluster_network_subnet_identity_model - instance_cluster_network_attachment_prototype_instance_context_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeInstanceContext - instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_model - ) + instance_cluster_network_attachment_prototype_instance_context_model = {} # InstanceClusterNetworkAttachmentPrototypeInstanceContext + instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = instance_cluster_network_attachment_prototype_cluster_network_interface_model instance_cluster_network_attachment_prototype_instance_context_model['name'] = 'my-instance-network-attachment' trusted_profile_identity_model = {} # TrustedProfileIdentityById @@ -113915,9 +100988,7 @@ def test_instance_template_instance_by_catalog_offering_instance_template_contex 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 = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName @@ -113927,13 +100998,11 @@ def test_instance_template_instance_by_catalog_offering_instance_template_contex reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype - instance_reservation_affinity_prototype_model['policy'] = 'disabled' + instance_reservation_affinity_prototype_model['policy'] = 'automatic' 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['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' @@ -113949,9 +101018,7 @@ def test_instance_template_instance_by_catalog_offering_instance_template_contex 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' @@ -113968,26 +101035,16 @@ def test_instance_template_instance_by_catalog_offering_instance_template_contex 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 = {} # 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['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_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' - ) + 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 @@ -113996,16 +101053,12 @@ def test_instance_template_instance_by_catalog_offering_instance_template_contex 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 = {} # 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' @@ -114016,153 +101069,64 @@ def test_instance_template_instance_by_catalog_offering_instance_template_contex 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 = {} # 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['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['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['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_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[ - 'cluster_network_attachments' - ] = [ - instance_cluster_network_attachment_prototype_instance_context_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 + 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['cluster_network_attachments'] = [instance_cluster_network_attachment_prototype_instance_context_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:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' + 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/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_attachment_model_json['id'] = '0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' + 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_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 - ) + 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 - ) + 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 - ) + 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: @@ -114170,9 +101134,7 @@ class TestModel_InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext 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, - ): + 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 """ @@ -114182,9 +101144,7 @@ def test_instance_template_instance_by_catalog_offering_instance_template_contex instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - cluster_network_interface_primary_ip_prototype_model = ( - {} - ) # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext + cluster_network_interface_primary_ip_prototype_model = {} # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext cluster_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' cluster_network_interface_primary_ip_prototype_model['auto_delete'] = False cluster_network_interface_primary_ip_prototype_model['name'] = 'my-cluster-network-subnet-reserved-ip' @@ -114192,26 +101152,14 @@ def test_instance_template_instance_by_catalog_offering_instance_template_contex cluster_network_subnet_identity_model = {} # ClusterNetworkSubnetIdentityById cluster_network_subnet_identity_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - instance_cluster_network_attachment_prototype_cluster_network_interface_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment + instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = ( - 'my-cluster-network-interface' - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = ( - cluster_network_interface_primary_ip_prototype_model - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = ( - cluster_network_subnet_identity_model - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = cluster_network_subnet_identity_model - instance_cluster_network_attachment_prototype_instance_context_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeInstanceContext - instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_model - ) + instance_cluster_network_attachment_prototype_instance_context_model = {} # InstanceClusterNetworkAttachmentPrototypeInstanceContext + instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = instance_cluster_network_attachment_prototype_cluster_network_interface_model instance_cluster_network_attachment_prototype_instance_context_model['name'] = 'my-instance-network-attachment' trusted_profile_identity_model = {} # TrustedProfileIdentityById @@ -114229,9 +101177,7 @@ def test_instance_template_instance_by_catalog_offering_instance_template_contex 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 = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName @@ -114241,13 +101187,11 @@ def test_instance_template_instance_by_catalog_offering_instance_template_contex reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype - instance_reservation_affinity_prototype_model['policy'] = 'disabled' + instance_reservation_affinity_prototype_model['policy'] = 'automatic' 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['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' @@ -114263,9 +101207,7 @@ def test_instance_template_instance_by_catalog_offering_instance_template_contex 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' @@ -114282,26 +101224,16 @@ def test_instance_template_instance_by_catalog_offering_instance_template_contex 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 = {} # 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['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_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' - ) + 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 @@ -114310,9 +101242,7 @@ def test_instance_template_instance_by_catalog_offering_instance_template_contex 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' @@ -114331,124 +101261,47 @@ def test_instance_template_instance_by_catalog_offering_instance_template_contex 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[ - 'cluster_network_attachments' - ] = [ - instance_cluster_network_attachment_prototype_instance_context_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 + 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['cluster_network_attachments'] = [instance_cluster_network_attachment_prototype_instance_context_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:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' + 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/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' + instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model_json['id'] = '0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' + 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 - ) - assert ( - instance_template_instance_by_catalog_offering_instance_template_context_instance_by_catalog_offering_instance_template_context_instance_by_network_interface_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment: @@ -114456,9 +101309,7 @@ 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 """ @@ -114468,9 +101319,7 @@ def test_instance_template_instance_by_image_instance_template_context_instance_ instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - cluster_network_interface_primary_ip_prototype_model = ( - {} - ) # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext + cluster_network_interface_primary_ip_prototype_model = {} # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext cluster_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' cluster_network_interface_primary_ip_prototype_model['auto_delete'] = False cluster_network_interface_primary_ip_prototype_model['name'] = 'my-cluster-network-subnet-reserved-ip' @@ -114478,26 +101327,14 @@ def test_instance_template_instance_by_image_instance_template_context_instance_ cluster_network_subnet_identity_model = {} # ClusterNetworkSubnetIdentityById cluster_network_subnet_identity_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - instance_cluster_network_attachment_prototype_cluster_network_interface_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment + instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = ( - 'my-cluster-network-interface' - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = ( - cluster_network_interface_primary_ip_prototype_model - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = ( - cluster_network_subnet_identity_model - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = cluster_network_subnet_identity_model - instance_cluster_network_attachment_prototype_instance_context_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeInstanceContext - instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_model - ) + instance_cluster_network_attachment_prototype_instance_context_model = {} # InstanceClusterNetworkAttachmentPrototypeInstanceContext + instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = instance_cluster_network_attachment_prototype_cluster_network_interface_model instance_cluster_network_attachment_prototype_instance_context_model['name'] = 'my-instance-network-attachment' trusted_profile_identity_model = {} # TrustedProfileIdentityById @@ -114515,9 +101352,7 @@ def test_instance_template_instance_by_image_instance_template_context_instance_ 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 = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName @@ -114527,13 +101362,11 @@ def test_instance_template_instance_by_image_instance_template_context_instance_ reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype - instance_reservation_affinity_prototype_model['policy'] = 'disabled' + instance_reservation_affinity_prototype_model['policy'] = 'automatic' 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['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' @@ -114549,9 +101382,7 @@ def test_instance_template_instance_by_image_instance_template_context_instance_ 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' @@ -114568,14 +101399,10 @@ def test_instance_template_instance_by_image_instance_template_context_instance_ 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 = {} # 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['volume'] = volume_prototype_instance_by_image_context_model image_identity_model = {} # ImageIdentityById image_identity_model['id'] = 'r006-02c73baf-9abb-493d-9e41-d0f1866f4051' @@ -114583,16 +101410,12 @@ 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 = {} # 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' @@ -114603,153 +101426,64 @@ def test_instance_template_instance_by_image_instance_template_context_instance_ 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 = {} # 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['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['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['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_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[ - 'cluster_network_attachments' - ] = [ - instance_cluster_network_attachment_prototype_instance_context_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 + 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['cluster_network_attachments'] = [instance_cluster_network_attachment_prototype_instance_context_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:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' + 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/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model_json['id'] = '0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' + 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 - ) - assert ( - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_attachment_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface: @@ -114757,9 +101491,7 @@ 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 """ @@ -114769,9 +101501,7 @@ def test_instance_template_instance_by_image_instance_template_context_instance_ instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - cluster_network_interface_primary_ip_prototype_model = ( - {} - ) # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext + cluster_network_interface_primary_ip_prototype_model = {} # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext cluster_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' cluster_network_interface_primary_ip_prototype_model['auto_delete'] = False cluster_network_interface_primary_ip_prototype_model['name'] = 'my-cluster-network-subnet-reserved-ip' @@ -114779,26 +101509,14 @@ def test_instance_template_instance_by_image_instance_template_context_instance_ cluster_network_subnet_identity_model = {} # ClusterNetworkSubnetIdentityById cluster_network_subnet_identity_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - instance_cluster_network_attachment_prototype_cluster_network_interface_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment + instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = ( - 'my-cluster-network-interface' - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = ( - cluster_network_interface_primary_ip_prototype_model - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = ( - cluster_network_subnet_identity_model - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = cluster_network_subnet_identity_model - instance_cluster_network_attachment_prototype_instance_context_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeInstanceContext - instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_model - ) + instance_cluster_network_attachment_prototype_instance_context_model = {} # InstanceClusterNetworkAttachmentPrototypeInstanceContext + instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = instance_cluster_network_attachment_prototype_cluster_network_interface_model instance_cluster_network_attachment_prototype_instance_context_model['name'] = 'my-instance-network-attachment' trusted_profile_identity_model = {} # TrustedProfileIdentityById @@ -114816,9 +101534,7 @@ def test_instance_template_instance_by_image_instance_template_context_instance_ 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 = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName @@ -114828,13 +101544,11 @@ def test_instance_template_instance_by_image_instance_template_context_instance_ reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype - instance_reservation_affinity_prototype_model['policy'] = 'disabled' + instance_reservation_affinity_prototype_model['policy'] = 'automatic' 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['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' @@ -114850,9 +101564,7 @@ def test_instance_template_instance_by_image_instance_template_context_instance_ 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' @@ -114869,14 +101581,10 @@ def test_instance_template_instance_by_image_instance_template_context_instance_ 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 = {} # 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['volume'] = volume_prototype_instance_by_image_context_model image_identity_model = {} # ImageIdentityById image_identity_model['id'] = 'r006-02c73baf-9abb-493d-9e41-d0f1866f4051' @@ -114884,9 +101592,7 @@ 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' @@ -114905,124 +101611,47 @@ def test_instance_template_instance_by_image_instance_template_context_instance_ 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[ - 'cluster_network_attachments' - ] = [ - instance_cluster_network_attachment_prototype_instance_context_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 + 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['cluster_network_attachments'] = [instance_cluster_network_attachment_prototype_instance_context_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:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' + 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/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' + instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model_json['id'] = '0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' + 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 - ) - assert ( - instance_template_instance_by_image_instance_template_context_instance_by_image_instance_template_context_instance_by_network_interface_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment: @@ -115030,9 +101659,7 @@ 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 """ @@ -115042,9 +101669,7 @@ def test_instance_template_instance_by_source_snapshot_instance_template_context instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - cluster_network_interface_primary_ip_prototype_model = ( - {} - ) # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext + cluster_network_interface_primary_ip_prototype_model = {} # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext cluster_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' cluster_network_interface_primary_ip_prototype_model['auto_delete'] = False cluster_network_interface_primary_ip_prototype_model['name'] = 'my-cluster-network-subnet-reserved-ip' @@ -115052,26 +101677,14 @@ def test_instance_template_instance_by_source_snapshot_instance_template_context cluster_network_subnet_identity_model = {} # ClusterNetworkSubnetIdentityById cluster_network_subnet_identity_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - instance_cluster_network_attachment_prototype_cluster_network_interface_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment + instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = ( - 'my-cluster-network-interface' - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = ( - cluster_network_interface_primary_ip_prototype_model - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = ( - cluster_network_subnet_identity_model - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = cluster_network_subnet_identity_model - instance_cluster_network_attachment_prototype_instance_context_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeInstanceContext - instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_model - ) + instance_cluster_network_attachment_prototype_instance_context_model = {} # InstanceClusterNetworkAttachmentPrototypeInstanceContext + instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = instance_cluster_network_attachment_prototype_cluster_network_interface_model instance_cluster_network_attachment_prototype_instance_context_model['name'] = 'my-instance-network-attachment' trusted_profile_identity_model = {} # TrustedProfileIdentityById @@ -115089,9 +101702,7 @@ def test_instance_template_instance_by_source_snapshot_instance_template_context 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 = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName @@ -115101,13 +101712,11 @@ def test_instance_template_instance_by_source_snapshot_instance_template_context reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype - instance_reservation_affinity_prototype_model['policy'] = 'disabled' + instance_reservation_affinity_prototype_model['policy'] = 'automatic' 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['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' @@ -115123,9 +101732,7 @@ def test_instance_template_instance_by_source_snapshot_instance_template_context 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' @@ -115136,9 +101743,7 @@ def test_instance_template_instance_by_source_snapshot_instance_template_context snapshot_identity_model = {} # SnapshotIdentityById snapshot_identity_model['id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' - volume_prototype_instance_by_source_snapshot_context_model = ( - {} - ) # VolumePrototypeInstanceBySourceSnapshotContext + 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 @@ -115148,18 +101753,12 @@ def test_instance_template_instance_by_source_snapshot_instance_template_context 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 = {} # 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_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 = {} # 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' @@ -115180,169 +101779,74 @@ def test_instance_template_instance_by_source_snapshot_instance_template_context 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 = {} # 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 = {} # 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['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['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['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_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[ - 'cluster_network_attachments' - ] = [ - instance_cluster_network_attachment_prototype_instance_context_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 + 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['cluster_network_attachments'] = [instance_cluster_network_attachment_prototype_instance_context_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:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' + 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/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model_json['id'] = '0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' + 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 - ) - assert ( - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_attachment_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface: @@ -115350,9 +101854,7 @@ 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 """ @@ -115362,9 +101864,7 @@ def test_instance_template_instance_by_source_snapshot_instance_template_context instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype instance_availability_policy_prototype_model['host_failure'] = 'restart' - cluster_network_interface_primary_ip_prototype_model = ( - {} - ) # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext + cluster_network_interface_primary_ip_prototype_model = {} # ClusterNetworkInterfacePrimaryIPPrototypeClusterNetworkSubnetReservedIPPrototypeClusterNetworkInterfacePrimaryIPContext cluster_network_interface_primary_ip_prototype_model['address'] = '10.0.0.5' cluster_network_interface_primary_ip_prototype_model['auto_delete'] = False cluster_network_interface_primary_ip_prototype_model['name'] = 'my-cluster-network-subnet-reserved-ip' @@ -115372,26 +101872,14 @@ def test_instance_template_instance_by_source_snapshot_instance_template_context cluster_network_subnet_identity_model = {} # ClusterNetworkSubnetIdentityById cluster_network_subnet_identity_model['id'] = '0717-7931845c-65c4-4b0a-80cd-7d9c1a6d7930' - instance_cluster_network_attachment_prototype_cluster_network_interface_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment + instance_cluster_network_attachment_prototype_cluster_network_interface_model = {} # InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceInstanceClusterNetworkInterfacePrototypeInstanceClusterNetworkAttachment instance_cluster_network_attachment_prototype_cluster_network_interface_model['auto_delete'] = False - instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = ( - 'my-cluster-network-interface' - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = ( - cluster_network_interface_primary_ip_prototype_model - ) - instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = ( - cluster_network_subnet_identity_model - ) + instance_cluster_network_attachment_prototype_cluster_network_interface_model['name'] = 'my-cluster-network-interface' + instance_cluster_network_attachment_prototype_cluster_network_interface_model['primary_ip'] = cluster_network_interface_primary_ip_prototype_model + instance_cluster_network_attachment_prototype_cluster_network_interface_model['subnet'] = cluster_network_subnet_identity_model - instance_cluster_network_attachment_prototype_instance_context_model = ( - {} - ) # InstanceClusterNetworkAttachmentPrototypeInstanceContext - instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = ( - instance_cluster_network_attachment_prototype_cluster_network_interface_model - ) + instance_cluster_network_attachment_prototype_instance_context_model = {} # InstanceClusterNetworkAttachmentPrototypeInstanceContext + instance_cluster_network_attachment_prototype_instance_context_model['cluster_network_interface'] = instance_cluster_network_attachment_prototype_cluster_network_interface_model instance_cluster_network_attachment_prototype_instance_context_model['name'] = 'my-instance-network-attachment' trusted_profile_identity_model = {} # TrustedProfileIdentityById @@ -115409,9 +101897,7 @@ def test_instance_template_instance_by_source_snapshot_instance_template_context 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 = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById instance_placement_target_prototype_model['id'] = '0717-1e09281b-f177-46fb-baf1-bc152b2e391a' instance_profile_identity_model = {} # InstanceProfileIdentityByName @@ -115421,13 +101907,11 @@ def test_instance_template_instance_by_source_snapshot_instance_template_context reservation_identity_model['id'] = '0717-ba49df72-37b8-43ac-98da-f8e029de0e63' instance_reservation_affinity_prototype_model = {} # InstanceReservationAffinityPrototype - instance_reservation_affinity_prototype_model['policy'] = 'disabled' + instance_reservation_affinity_prototype_model['policy'] = 'automatic' 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['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' @@ -115443,9 +101927,7 @@ def test_instance_template_instance_by_source_snapshot_instance_template_context 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' @@ -115456,9 +101938,7 @@ def test_instance_template_instance_by_source_snapshot_instance_template_context snapshot_identity_model = {} # SnapshotIdentityById snapshot_identity_model['id'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' - volume_prototype_instance_by_source_snapshot_context_model = ( - {} - ) # VolumePrototypeInstanceBySourceSnapshotContext + 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 @@ -115468,25 +101948,17 @@ def test_instance_template_instance_by_source_snapshot_instance_template_context 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 = {} # 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_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 = {} # 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 = {} # 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' @@ -115497,40 +101969,26 @@ def test_instance_template_instance_by_source_snapshot_instance_template_context 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 = {} # 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['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['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['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_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' @@ -115543,129 +102001,48 @@ def test_instance_template_instance_by_source_snapshot_instance_template_context 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[ - 'cluster_network_attachments' - ] = [ - instance_cluster_network_attachment_prototype_instance_context_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 + 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['cluster_network_attachments'] = [instance_cluster_network_attachment_prototype_instance_context_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:0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' + 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/0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' + instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model_json['id'] = '0717-e6c2c7d8-ad57-4f38-a21c-a86265b6aeb2' + 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 - ) - assert ( - instance_template_instance_by_source_snapshot_instance_template_context_instance_by_source_snapshot_instance_template_context_instance_by_network_interface_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref: @@ -115673,52 +102050,29 @@ 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 = {} + 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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-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 - ) - assert ( - load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById: @@ -115726,52 +102080,29 @@ 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 = {} + load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json['id'] = 'r006-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 - ) - assert ( - load_balancer_listener_policy_target_patch_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref: @@ -115779,52 +102110,29 @@ 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 = {} + 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/r006-dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/r006-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 - ) - assert ( - load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_href_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityLoadBalancerPoolIdentityById: @@ -115832,52 +102140,29 @@ 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 = {} + load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model_json['id'] = 'r006-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 - ) - assert ( - load_balancer_listener_policy_target_prototype_load_balancer_pool_identity_load_balancer_pool_identity_load_balancer_pool_identity_by_id_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN: @@ -115892,44 +102177,22 @@ def test_load_balancer_pool_member_target_prototype_instance_identity_instance_i # 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0' # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref: @@ -115944,44 +102207,22 @@ def test_load_balancer_pool_member_target_prototype_instance_identity_instance_i # 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0' # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById: @@ -115996,44 +102237,22 @@ def test_load_balancer_pool_member_target_prototype_instance_identity_instance_i # 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_e21b7391-2ca2-4ab5-84a8-b92157a633b0' - ) + load_balancer_pool_member_target_prototype_instance_identity_instance_identity_by_id_model_json['id'] = '0717_e21b7391-2ca2-4ab5-84a8-b92157a633b0' # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_NetworkInterfaceIPPrototypeReservedIPIdentityByHref: @@ -116048,44 +102267,22 @@ def test_network_interface_ip_prototype_reserved_ip_identity_by_href_serializati # 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 - ) + 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() - ) - assert ( - network_interface_ip_prototype_reserved_ip_identity_by_href_model_json2 - == network_interface_ip_prototype_reserved_ip_identity_by_href_model_json - ) + 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 class TestModel_NetworkInterfaceIPPrototypeReservedIPIdentityById: @@ -116100,44 +102297,22 @@ def test_network_interface_ip_prototype_reserved_ip_identity_by_id_serialization # 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 - ) + 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() - ) - assert ( - network_interface_ip_prototype_reserved_ip_identity_by_id_model_json2 - == network_interface_ip_prototype_reserved_ip_identity_by_id_model_json - ) + 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 class TestModel_PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress: @@ -116145,53 +102320,29 @@ 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN: @@ -116206,44 +102357,22 @@ def test_public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_i # 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:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) + 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:r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref: @@ -116258,44 +102387,22 @@ def test_public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_i # 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/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) + 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/r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById: @@ -116310,44 +102417,22 @@ def test_public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_i # 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'] = ( - 'r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' - ) + public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_identity_by_id_model_json['id'] = 'r006-f45e0d90-12a8-4460-8210-290ff2ab75cd' # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN: @@ -116355,53 +102440,29 @@ 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:r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref: @@ -116409,53 +102470,29 @@ 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/r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById: @@ -116470,44 +102507,22 @@ def test_reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway # 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'] = 'r006-7610ebfb-f5dc-4d42-bc18-287d47f7a5b0' # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN: @@ -116515,52 +102530,29 @@ 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' # 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 - ) - assert ( - reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref: @@ -116568,52 +102560,29 @@ 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/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + 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/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' # 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 - ) - assert ( - reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_ReservedIPTargetPrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById: @@ -116621,52 +102590,29 @@ 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' - ] = '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + 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'] = '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' # 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 - ) - assert ( - reserved_ip_target_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP: @@ -116684,39 +102630,19 @@ def test_route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_se 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP: @@ -116734,39 +102660,19 @@ def test_route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_ser 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref: @@ -116774,53 +102680,29 @@ 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 - ) - ) - assert ( - route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById: @@ -116828,53 +102710,29 @@ 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP: @@ -116892,39 +102750,19 @@ def test_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_i 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 RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP by calling from_dict on the json representation - route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model = ( - RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP.from_dict( - route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json - ) - ) + route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model = RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP.from_dict(route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json) assert route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model != False # Construct a model instance of RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP by calling from_dict on the json representation - route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_dict = ( - RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP.from_dict( - route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json - ).__dict__ - ) - route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model2 = ( - RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP( - **route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_dict - ) - ) + route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_dict = RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP.from_dict(route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json).__dict__ + route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model2 = RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP(**route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_dict) # Verify the model instances are equivalent - assert ( - route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model - == route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model2 - ) + assert route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model == 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_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json2 = ( - route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model.to_dict() - ) - assert ( - route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json2 - == route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json - ) + route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json2 = route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model.to_dict() + assert route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json2 == route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json class TestModel_RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP: @@ -116942,39 +102780,19 @@ def test_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_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 RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP by calling from_dict on the json representation - route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model = ( - RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP.from_dict( - route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json - ) - ) + route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model = RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP.from_dict(route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json) assert route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model != False # Construct a model instance of RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP by calling from_dict on the json representation - route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_dict = ( - RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP.from_dict( - route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json - ).__dict__ - ) - route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model2 = ( - RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP( - **route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_dict - ) - ) + route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_dict = RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP.from_dict(route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json).__dict__ + route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model2 = RouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP(**route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_dict) # Verify the model instances are equivalent - assert ( - route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model - == route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model2 - ) + assert route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model == 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_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json2 = ( - route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model.to_dict() - ) - assert ( - route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json2 - == route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json - ) + route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json2 = route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model.to_dict() + assert route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json2 == route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json class TestModel_RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref: @@ -116982,50 +102800,29 @@ class TestModel_RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConne Test Class for RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref """ - def test_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_serialization( - self, - ): + def test_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_serialization(self): """ Test serialization/deserialization for RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref """ # Construct a json representation of a RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref model route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json = {} - 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_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 RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref by calling from_dict on the json representation - route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model = RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref.from_dict( - route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json - ) - assert ( - route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model - != False - ) + route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model = RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref.from_dict(route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json) + assert route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model != False # Construct a model instance of RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref by calling from_dict on the json representation - route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_dict = RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref.from_dict( - route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json - ).__dict__ - route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model2 = RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref( - **route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_dict - ) + route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_dict = RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref.from_dict(route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json).__dict__ + route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model2 = RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref(**route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_dict) # Verify the model instances are equivalent - assert ( - route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model - == route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model2 - ) + assert route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model == 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_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json2 = ( - route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model.to_dict() - ) - assert ( - route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json2 - == route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json - ) + route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json2 = route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model.to_dict() + assert route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json2 == route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json class TestModel_RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById: @@ -117033,50 +102830,29 @@ class TestModel_RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConne Test Class for RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById """ - def test_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_serialization( - self, - ): + def test_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_serialization(self): """ Test serialization/deserialization for RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById """ # Construct a json representation of a RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById model route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json = {} - route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json[ - 'id' - ] = 'a10a5771-dc23-442c-8460-c3601d8542f7' + 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 RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById by calling from_dict on the json representation - route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model = RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById.from_dict( - route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json - ) - assert ( - route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model - != False - ) + route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model = RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById.from_dict(route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json) + assert route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model != False # Construct a model instance of RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById by calling from_dict on the json representation - route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_dict = RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById.from_dict( - route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json - ).__dict__ - route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model2 = RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById( - **route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_dict - ) + route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_dict = RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById.from_dict(route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json).__dict__ + route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model2 = RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById(**route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_dict) # Verify the model instances are equivalent - assert ( - route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model - == route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model2 - ) + assert route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model == 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_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json2 = ( - route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model.to_dict() - ) - assert ( - route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json2 - == route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json - ) + route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json2 = route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model.to_dict() + assert route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json2 == route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json class TestModel_SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN: @@ -117084,53 +102860,29 @@ 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref: @@ -117138,53 +102890,29 @@ 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById: @@ -117199,44 +102927,22 @@ def test_security_group_rule_remote_patch_security_group_identity_security_group # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN: @@ -117244,55 +102950,29 @@ 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 - ) - ) - assert ( - security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_crn_model != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref: @@ -117300,53 +102980,29 @@ 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 - ) - ) - assert ( - security_group_rule_remote_prototype_security_group_identity_security_group_identity_by_href_model != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById: @@ -117354,53 +103010,29 @@ 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByCRN: @@ -117408,52 +103040,29 @@ 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + 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:0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' # 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 - ) - assert ( - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_crn_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityByHref: @@ -117461,52 +103070,29 @@ 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/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + 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/0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' # 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 - ) - assert ( - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_href_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfaceIdentityVirtualNetworkInterfaceIdentityById: @@ -117514,52 +103100,119 @@ 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' - ] = '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' + 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'] = '0717-54eb57ee-86f2-4796-90bb-d7874e0831ef' # 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 - ) - assert ( - share_mount_target_virtual_network_interface_prototype_virtual_network_interface_identity_virtual_network_interface_identity_by_id_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 + + +class TestModel_ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByCRN: + """ + Test Class for ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByCRN + """ + + def test_share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_crn_serialization(self): + """ + Test serialization/deserialization for ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByCRN + """ + + # Construct a json representation of a ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByCRN model + share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_crn_model_json = {} + share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_crn_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/aa2432b1fa4d4ace891e9b80fc104e34::share-snapshot:r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4' + + # Construct a model instance of ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByCRN by calling from_dict on the json representation + share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_crn_model = ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByCRN.from_dict(share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_crn_model_json) + assert share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_crn_model != False + + # Construct a model instance of ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByCRN by calling from_dict on the json representation + share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_crn_model_dict = ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByCRN.from_dict(share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_crn_model_json).__dict__ + share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_crn_model2 = ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByCRN(**share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_crn_model_dict) + + # Verify the model instances are equivalent + assert share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_crn_model == share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_crn_model2 + + # Convert model instance back to dict and verify no loss of data + share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_crn_model_json2 = share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_crn_model.to_dict() + assert share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_crn_model_json2 == share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_crn_model_json + + +class TestModel_ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByHref: + """ + Test Class for ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByHref + """ + + def test_share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_href_serialization(self): + """ + Test serialization/deserialization for ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByHref + """ + + # Construct a json representation of a ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByHref model + share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_href_model_json = {} + share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/shares/r006-0fe9e5d8-0a4d-4818-96ec-e99708644a58/snapshots/r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4' + + # Construct a model instance of ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByHref by calling from_dict on the json representation + share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_href_model = ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByHref.from_dict(share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_href_model_json) + assert share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_href_model != False + + # Construct a model instance of ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByHref by calling from_dict on the json representation + share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_href_model_dict = ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByHref.from_dict(share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_href_model_json).__dict__ + share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_href_model2 = ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityByHref(**share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_href_model_dict) + + # Verify the model instances are equivalent + assert share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_href_model == share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_href_model2 + + # Convert model instance back to dict and verify no loss of data + share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_href_model_json2 = share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_href_model.to_dict() + assert share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_href_model_json2 == share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_href_model_json + + +class TestModel_ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityById: + """ + Test Class for ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityById + """ + + def test_share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_id_serialization(self): + """ + Test serialization/deserialization for ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityById + """ + + # Construct a json representation of a ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityById model + share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_id_model_json = {} + share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_id_model_json['id'] = 'r006-e13ee54f-baa4-40d3-b35c-b9ec163972b4' + + # Construct a model instance of ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityById by calling from_dict on the json representation + share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_id_model = ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityById.from_dict(share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_id_model_json) + assert share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_id_model != False + + # Construct a model instance of ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityById by calling from_dict on the json representation + share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_id_model_dict = ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityById.from_dict(share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_id_model_json).__dict__ + share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_id_model2 = ShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIdentityById(**share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_id_model_dict) + + # Verify the model instances are equivalent + assert share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_id_model == share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_id_model2 + + # Convert model instance back to dict and verify no loss of data + share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_id_model_json2 = share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_id_model.to_dict() + assert share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_id_model_json2 == share_source_snapshot_prototype_share_snapshot_identity_share_snapshot_identity_by_id_model_json class TestModel_VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch: @@ -117567,52 +103220,29 @@ 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 = {} + 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 - ) - 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 - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerFQDNPatch: @@ -117620,52 +103250,29 @@ 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 = {} + 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 - ) - 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 - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch: @@ -117673,52 +103280,29 @@ 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 = {} + 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 - ) - 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 - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionStaticRouteModePeerPatchVPNGatewayConnectionPeerFQDNPatch: @@ -117726,52 +103310,29 @@ 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 = {} + 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 - ) - 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 - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode: @@ -117796,45 +103357,31 @@ def test_vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_m ike_policy_reference_model = {} # IKEPolicyReference ike_policy_reference_model['deleted'] = 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['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_model = {} # IPsecPolicyReference i_psec_policy_reference_model['deleted'] = 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['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_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 = {} # 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_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 = {} # 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' @@ -117844,111 +103391,51 @@ def test_vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_m 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['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['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'] = 'policy' - 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['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['distribute_traffic'] = ( - True - ) - 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['status_reasons'] = [vpn_gateway_connection_status_reason_model] + vpn_gateway_connection_route_mode_vpn_gateway_connection_static_route_mode_model_json['distribute_traffic'] = True + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextByHref: @@ -117956,52 +103443,29 @@ 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 = {} + 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 - ) - assert ( - virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_href_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VirtualNetworkInterfaceIPPrototypeReservedIPIdentityVirtualNetworkInterfaceIPsContextById: @@ -118009,52 +103473,29 @@ 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 = {} + 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 - ) - assert ( - virtual_network_interface_ip_prototype_reserved_ip_identity_virtual_network_interface_i_ps_context_by_id_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref: @@ -118062,52 +103503,29 @@ 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 = {} + 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 - ) - assert ( - virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_href_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextById: @@ -118115,52 +103533,29 @@ 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 = {} + 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 - ) - assert ( - virtual_network_interface_primary_ip_prototype_reserved_ip_identity_virtual_network_interface_primary_ip_context_by_id_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN: @@ -118175,44 +103570,22 @@ def test_volume_attachment_prototype_volume_volume_identity_volume_identity_by_c # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref: @@ -118227,44 +103600,22 @@ def test_volume_attachment_prototype_volume_volume_identity_volume_identity_by_h # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById: @@ -118279,44 +103630,22 @@ def test_volume_attachment_prototype_volume_volume_identity_volume_identity_by_i # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity: @@ -118324,9 +103653,7 @@ 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 """ @@ -118340,67 +103667,32 @@ 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 = {} + 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 - ) - assert ( - volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_capacity_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot: @@ -118408,9 +103700,7 @@ 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 """ @@ -118424,73 +103714,36 @@ 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'] = 'r134-f6bfa329-0e36-433f-a3bb-0df632e79263' # 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 = {} + 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 - ) - assert ( - volume_attachment_prototype_volume_volume_prototype_instance_context_volume_prototype_instance_context_volume_by_source_snapshot_model - != False - ) + 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup: @@ -118498,66 +103751,36 @@ 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 = {} # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager: @@ -118565,68 +103788,38 @@ 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 = {} # 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['id'] = 'r006-bd21f31f-8a05-4451-836d-ab0347e91fea' # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup: @@ -118641,57 +103834,29 @@ def test_instance_group_manager_action_prototype_scheduled_action_prototype_by_r # 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 = {} # 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 - ) + 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() - ) - 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 - ) + 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 class TestModel_InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager: @@ -118699,68 +103864,38 @@ 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 = {} # 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['id'] = 'r006-bd21f31f-8a05-4451-836d-ab0347e91fea' # 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 - ) + 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() - ) - 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 - ) + 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 # endregion